Cassette.Server (cassette v1.5.3)
The GenServer that maintains the CAS cache in its state
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Returns this server's current configuration
Initializes the server with the given configuration
Changes the internal state configuration to config
Generates Service Ticket based on the configuration of the server and the
given tgt
Generates a Ticket Granting Ticket based on the configuration of the server
Validates a ticket for the given service
Link to this section Functions
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor.
config(server)
Specs
config(GenServer.server()) :: Cassette.Config.t()
Returns this server's current configuration
init(arg)
Specs
init({:ok, Cassette.Config.t()}) :: {:ok, Cassette.Server.State.t()}
Initializes the server with the given configuration
reload(server, config)
Specs
reload(GenServer.server(), Cassette.Config.t()) :: term()
Changes the internal state configuration to config
st(server, current_tgt, service, timeout \\ 5000)
Specs
Generates Service Ticket based on the configuration of the server and the
given tgt
tgt(server, timeout \\ 5000)
Specs
tgt(GenServer.server(), timeout()) :: {:ok, String.t()} | {:error, term()}
Generates a Ticket Granting Ticket based on the configuration of the server
validate(server, ticket, service, timeout \\ 5000)
Specs
validate(GenServer.server(), String.t(), String.t(), timeout()) :: {:ok, Cassette.User.t()} | {:error, term()}
Validates a ticket for the given service