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

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

Returns this server's current configuration

Specs

init({:ok, Cassette.Config.t()}) :: {:ok, Cassette.Server.State.t()}

Initializes the server with the given configuration

Link to this function

reload(server, config)

Specs

Changes the internal state configuration to config

Link to this function

st(server, current_tgt, service, timeout \\ 5000)

Specs

st(GenServer.server(), String.t(), String.t(), timeout()) ::
  {:ok, String.t()} | {:error, term()}

Generates Service Ticket based on the configuration of the server and the given tgt

Link to this function

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

Link to this function

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