cassette v1.0.0 Cassette.Config

Struct that represents Cassette configuration

Summary

Types

t()

The following keys are supported and may be defined in your application env

Functions

Returns a configuration based on what is set in application environment and default values

Types

t :: %Cassette.Config{base_authority: String.t, base_url: String.t, insecure: term, password: String.t, service: String.t, st_ttl: non_neg_integer, tgt_ttl: non_neg_integer, username: String.t, validation_ttl: non_neg_integer}

The following keys are supported and may be defined in your application env

  • username - the username to authenticate on cas server
  • password - the password to authenticate on cas server
  • base_url - the base url for your CAS server (do not include the login/)
  • base_authority - simplifies role checking, please refer to Cassette.User.has_role?/2
  • service - the CAS service to use when validating service tickets
  • tgt_ttl - the TGT cache time to live
  • st_ttl - the ST cache time to live
  • validation_ttl - the ST validation cache time to live
  • insecure - boolean to allow connection even with ssl certificate check fails

Any of those keys may be set in your Application environment (or the mix config/config.exs) as:

config :cassette, username: "john.doe"

Please check the Cassette.Config.default/0 function.

Functions

default()

Specs

default :: Cassette.Config.t

Returns a configuration based on what is set in application environment and default values

Check Cassette.Config.t for key details