Documentation
¶
Index ¶
- type Auth
- func (c *Auth) CreateIdpClient(idpClient *IdpClient) (response.Identifier, error)
- func (c *Auth) DeleteIdpClient(idpID string) error
- func (c *Auth) GetIdpClient(idpID string) (*IdpClient, error)
- func (c *Auth) GetSourceSessions(sourceID string, opts ...filters.Option) (*response.ResultSet[Session], error)
- func (c *Auth) GetUserPairedDevices(userID string) (*response.ResultSet[Device], error)
- func (c *Auth) GetUserSessions(userID string, opts ...filters.Option) (*response.ResultSet[Session], error)
- func (c *Auth) Logout() error
- func (c *Auth) RegenerateIdpClientConfig(idpID string) (*IdpClientConfig, error)
- func (c *Auth) SearchSessions(search *SessionSearch, opts ...filters.Option) (*response.ResultSet[Session], error)
- func (c *Auth) Status() (*response.ServiceStatus, error)
- func (c *Auth) TerminateSession(sessionID string) error
- func (c *Auth) TerminateUserSessions(userID string) error
- func (c *Auth) UnpairUserDevice(userID, deviceID string) error
- func (c *Auth) UpdateIdpClient(idpClient *IdpClient, idpID string) error
- type Device
- type IdpClient
- type IdpClientConfig
- type Session
- type SessionPasswordPolicy
- type SessionSearch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth is a auth client instance.
func (*Auth) CreateIdpClient ¶
func (c *Auth) CreateIdpClient(idpClient *IdpClient) (response.Identifier, error)
MARK: Identity Provider CreateIdpClient creates a new identity provider client configuration.
func (*Auth) DeleteIdpClient ¶
DeleteIdpClient delete identity provider client configuration by id.
func (*Auth) GetIdpClient ¶
GetIdpClient get existing identity provider client configuration.
func (*Auth) GetSourceSessions ¶
func (c *Auth) GetSourceSessions(sourceID string, opts ...filters.Option) (*response.ResultSet[Session], error)
GetSourceSessions get valid sessions by sourceID.
func (*Auth) GetUserPairedDevices ¶
MARK: Mobile Gateway GetUserPairedDevices get users paired devices.
func (*Auth) GetUserSessions ¶
func (c *Auth) GetUserSessions(userID string, opts ...filters.Option) (*response.ResultSet[Session], error)
MARK: Session Storage GetUserSessions get valid sessions by userID.
func (*Auth) RegenerateIdpClientConfig ¶
func (c *Auth) RegenerateIdpClientConfig(idpID string) (*IdpClientConfig, error)
RegenerateIdpClientConfig regenerates client_id and client_secret for OIDC identity provider client configuration.
func (*Auth) SearchSessions ¶
func (c *Auth) SearchSessions(search *SessionSearch, opts ...filters.Option) (*response.ResultSet[Session], error)
SearchSessions searches for sessions
func (*Auth) Status ¶
func (c *Auth) Status() (*response.ServiceStatus, error)
MARK: Status Status get auth microservice status.
func (*Auth) TerminateSession ¶
TerminateSession terminates single session by id.
func (*Auth) TerminateUserSessions ¶
TerminateUserSessions terminates all sessions for a user.
func (*Auth) UnpairUserDevice ¶
UnpairUserDevice unpair users device.
type Device ¶
type Device struct {
ID string `json:"id"`
OS string `json:"os"`
Name string `json:"name"`
Activated string `json:"activated"`
Updated string `json:"updated"`
LastUsed string `json:"lastUsed"`
}
Device paired mobile gateway device definition.
type IdpClient ¶
type IdpClient struct {
ID string `json:"id"`
Name string `json:"name"`
Created time.Time `json:"created,omitempty"`
Updated time.Time `json:"updated,omitempty"`
IDPType string `json:"idp_type"`
OIDCIssuer string `json:"oidc_issuer,omitempty"`
OIDCAudience []string `json:"oidc_audience"`
OIDCClientID string `json:"oidc_client_id,omitempty"`
OIDCClientSecret string `json:"oidc_client_secret,omitempty"`
OIDCScopesEnabled []string `json:"oidc_scopes_enabled"`
OIDCResponseTypesSupported []string `json:"oidc_response_types_supported,omitempty"`
OIDCGrantTypesSupported []string `json:"oidc_grant_types_supported,omitempty"`
OIDCEnablePKCE bool `json:"oidc_code_challenge_method_enabled,omitempty"`
OIDCEnabledAuthMethod string `json:"oidc_auth_method_enabled,omitempty"`
OIDCAuthMethodPost bool `json:"oidc_auth_method_post,omitempty"`
OIDCGrantTypeRefreshToken bool `json:"oidc_grant_type_refresh_token,omitempty"`
OIDCAllowedRedirectURIs []string `json:"oidc_allowed_redirect_uris,omitempty"`
OIDCDefaultLogoutRedirectURI string `json:"oidc_default_logout_redirect_uri,omitempty"`
OIDCAllowedLogoutRedirectURIs []string `json:"oidc_allowed_logout_redirect_uris,omitempty"`
OIDCAttributeMapping map[string]string `json:"oidc_attribute_mapping,omitempty"`
OIDCSignatureAlgorithm string `json:"oidc_signature_algorithm,omitempty"`
OIDCAccessTokenValidInMinutes int `json:"oidc_access_token_valid_in_minutes,omitempty"`
OIDCRefreshTokenValidInMinutes int `json:"oidc_refresh_token_valid_in_minutes,omitempty"`
UserFilter string `json:"user_filter,omitempty"`
Enabled bool `json:"enabled"`
ContainerRequired bool `json:"container_required,omitempty"`
}
IdpClient identity provider client definition.
type IdpClientConfig ¶
type IdpClientConfig struct {
ClientId string `json:"client_id"`
ClientSecret string `json:"client_secret"`
}
IdpClientConfig identity provider client config definition.
type Session ¶
type Session struct {
ID string `json:"id"`
UserID string `json:"user_id"`
SourceID string `json:"source_id"`
Domain string `json:"domain"`
Username string `json:"username"`
RemoteAddr string `json:"remote_addr"`
UserAgent string `json:"user_agent"`
Type string `json:"type"`
ParentSessionID string `json:"parent_session_id,omitempty"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
Expires time.Time `json:"expires"`
TokenExpires time.Time `json:"token_expires"`
LoggedOut bool `json:"logged_out"`
Current bool `json:"current,omitempty"`
}
Session session definition
type SessionPasswordPolicy ¶
type SessionPasswordPolicy struct {
PasswordMinLength int `json:"password_min_length"`
PasswordMaxLength int `json:"password_max_length"`
UseSpecialCharacters bool `json:"use_special_characters"`
UseLowercase bool `json:"use_lower_case"`
UseUppercase bool `json:"use_upper_case"`
UseNumbers bool `json:"use_numbers"`
PasswordEntropy int `json:"password_entropy,omitempty"`
PasswordStrength string `json:"password_strength,omitempty"`
}
SessionPasswordPolicy session password policy definition.
type SessionSearch ¶
type SessionSearch struct {
Keywords string `json:"keywords,omitempty"`
UserID string `json:"user_id,omitempty"`
Type string `json:"type,omitempty"`
}
SessionSearch session search request parameter definition.