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

Functions

Returns the TCP port FakeCas is running on

Stops the server

The only password FakeCas server will consider valid

The only ST FakeCas server will consider valid

The only TGT FakeCas server will consider valid

The only username FakeCas server will consider valid

Link to this section Functions

Link to this macro

children(opts) (macro)

Returns the TCP port FakeCas is running on

Link to this function

stop()
stop() :: none()

Stops the server

Link to this function

valid_password()
valid_password() :: String.t()

The only password FakeCas server will consider valid

Link to this function

valid_st()
valid_st() :: String.t()

The only ST FakeCas server will consider valid

Link to this function

valid_tgt()
valid_tgt() :: String.t()

The only TGT FakeCas server will consider valid

Link to this function

valid_username()
valid_username() :: String.t()

The only username FakeCas server will consider valid