Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddIDPFromConfig ¶
func AddIDPFromConfig(file string)
Read a configuration file and add an identity provider
func Authenticate ¶
func Authenticate(pi int, w http.ResponseWriter, r *http.Request)
Handle redirect to IdP indexed by pi
Types ¶
type Auth ¶
type Auth struct { URL string // URL originally requested AccessToken string // Access token for session IDToken string // Identity token ExpiresIn int // Timeout for session Name string // Authenticated user's name ProviderIdx int // Index of provider that authenticated }
Structure to contain response data from identity provider
type IDPConfig ¶
type IDPConfig struct { Name string // Name of the identity provider Endpoint string // Endpoint for ID services Revocation string // Revocation endpoint, cf RFC 7009 ClientID string // Client ID embedded directly ClientIDEnv string // Environment variable with Client ID ClientSecret string // Client secret embedded directly ClientSecretEnv string // Environment variable with client secret RedirectURL string // URL the provider should redirect to }
Identity provider
Click to show internal directories.
Click to hide internal directories.