cassette v1.2.6 Cassette.Server

The GenServer that maintains the CAS cache in its state

Summary

Functions

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

Types

config_request :: {:config}
reload_reply :: :ok
st_reply :: {:ok, String.t} | {:error, term}
st_request :: {:st, String.t, String.t, non_neg_integer}
tgt_reply :: {:ok, String.t} | {:error, term}
tgt_request :: {:tgt, non_neg_integer}
validate_reply ::
  {:ok, Cassette.User.t} |
  {:error, term}
validate_request :: {:validate, String.t, String.t, non_neg_integer}

Functions

config(server)

Specs

config(pid) :: Cassette.Config.t

Returns this server’s current configuration

init(args)

Specs

Initializes the server with the given configuration

reload(server, config)

Changes the internal state configuration to config

st(server, current_tgt, service)

Specs

st(pid, String.t, String.t) ::
  {:ok, String.t} |
  {:error, term}

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

tgt(server)

Specs

tgt(pid) :: {:ok, String.t} | {:error, term}

Generates a Ticket Granting Ticket based on the configuration of the server

validate(server, ticket, service)

Specs

validate(pid, String.t, String.t) ::
  {:ok, Cassette.User.t} |
  {:error, term}

Validates a ticket for the given service