Documentation
¶
Overview ¶
Package broker is the generic oidc business code.
Index ¶
- Constants
- Variables
- func GetDropInDir(cfgPath string) string
- type Broker
- func (b *Broker) CancelIsAuthenticated(sessionID string)
- func (b *Broker) EndSession(sessionID string) error
- func (b *Broker) GetAuthenticationModes(sessionID string, supportedUILayouts []map[string]string) (authModesWithLabels []map[string]string, err error)
- func (b *Broker) IsAuthenticated(sessionID, authenticationData string) (string, string, error)
- func (b *Broker) NewSession(username, lang, mode string) (sessionID, encryptionKey string, err error)
- func (b *Broker) SelectAuthenticationMode(sessionID, authModeID string) (uiLayoutInfo map[string]string, err error)
- func (b *Broker) UserPreCheck(username string) (string, error)
- type Config
- type Option
Constants ¶
View Source
const ( // AuthGranted is the response when the authentication is granted. AuthGranted = "granted" // AuthDenied is the response when the authentication is denied. AuthDenied = "denied" // AuthCancelled is the response when the authentication is cancelled. AuthCancelled = "cancelled" // AuthRetry is the response when the authentication needs to be retried (another chance). AuthRetry = "retry" // AuthNext is the response when another MFA (including changing password) authentication is necessary. AuthNext = "next" )
Broker responses.
View Source
const ( // AuthDataSecret is the key for the secret in the authentication data. AuthDataSecret = "secret" // AuthDataSecretOld is the old key for the secret in the authentication data, which is now deprecated // TODO(UDENG-5844): Remove this once all authd installations use "secret" instead of "challenge". AuthDataSecretOld = "challenge" )
Variables ¶
View Source
var AuthReplies = []string{AuthGranted, AuthDenied, AuthCancelled, AuthRetry, AuthNext}
AuthReplies is the list of all possible authentication replies.
Functions ¶
func GetDropInDir ¶
GetDropInDir takes the broker configuration path and returns the drop in dir path.
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker is the real implementation of the broker to track sessions and process oidc calls.
func (*Broker) CancelIsAuthenticated ¶
CancelIsAuthenticated cancels the IsAuthenticated call for the user.
func (*Broker) EndSession ¶
EndSession ends the session for the user.
func (*Broker) GetAuthenticationModes ¶
func (b *Broker) GetAuthenticationModes(sessionID string, supportedUILayouts []map[string]string) (authModesWithLabels []map[string]string, err error)
GetAuthenticationModes returns the authentication modes available for the user.
func (*Broker) IsAuthenticated ¶
IsAuthenticated evaluates the provided authenticationData and returns the authentication status for the user.
func (*Broker) NewSession ¶
func (b *Broker) NewSession(username, lang, mode string) (sessionID, encryptionKey string, err error)
NewSession creates a new session for the user.
Directories
¶
Path | Synopsis |
---|---|
Package authmodes lists the authentication modes that providers can support.
|
Package authmodes lists the authentication modes that providers can support. |
Package sessionmode defines the session modes supported by the broker.
|
Package sessionmode defines the session modes supported by the broker. |
Click to show internal directories.
Click to hide internal directories.