fake_cas v1.4.0 FakeCas
This module starts an application running an webserver that stubs CAS requests.
Starting
Start the GenServer by calling FakeCas.start.
The TCP port FakeCas is running can be obtained by calling FakeCas.port
Requests
The server will validate requests do a POST /v1/tickets and validate credentials against the valid_* functions on FakeCas module
The server will always return the same TGT
It will also generate STs using the valid TGT for any service on POST /v1/tickets/#{valid_tgt}
Trying to validate the ST in FakeCas.valid_st/0 will always succeed for any service:
Any other value will fail.
Link to this section Summary
Link to this section Functions
children(opts) (macro)
port()
port() :: non_neg_integer()
port() :: non_neg_integer()
Returns the TCP port FakeCas is running on
stop()
stop() :: none()
stop() :: none()
Stops the server
valid_password()
valid_password() :: String.t()
valid_password() :: String.t()
The only password FakeCas server will consider valid
valid_st()
valid_st() :: String.t()
valid_st() :: String.t()
The only ST FakeCas server will consider valid
valid_tgt()
valid_tgt() :: String.t()
valid_tgt() :: String.t()
The only TGT FakeCas server will consider valid
valid_username()
valid_username() :: String.t()
valid_username() :: String.t()
The only username FakeCas server will consider valid