package
0.55.1
Repository: https://github.com/ovh/cds.git
Documentation: pkg.go.dev

# Packages

# Functions

CheckDefaultSigninStateToken checks if a given signature is a valid signin state.
CheckSession returns the session if valid for given id.
CheckSessionWithCustomMFADuration returns the session if valid for given id.
ConsumerInvalidateGroupForUser set group as invalid in all user's consumers and set warning.
ConsumerInvalidateGroupsForUser set groups as invalid if the user is not a member in all user's consumers and set warning.
ConsumerRegen updates a consumer issue date to invalidate old signin token.
ConsumerRemoveGroup removes given group from all consumers that using it, set warning and disabled state if needed.
ConsumerRestoreInvalidatedGroupForUser checks if there are consumers for given user where the group was invalidated, then restore it and remove warning.
ConsumerRestoreInvalidatedGroupsForUser restore invalidated group for all user's consumer, this should be used only for a admin user.
DeleteConsumerByID removes a auth consumer in database for given id.
DeleteSessionByID removes a auth session in database for given id.
GetSessionActivity returns if given session is active.
GetSessionXSRFToken returns a XSRF token from cache if exists for given session.
Init the package by passing the signing key.
InsertHatcheryConsumer in database.
InsertSession in database.
InsertUserConsumer in database.
LoadExpiredSessions returns all expired session.
DEPRECATED - load old consumers, only use for migration.
LoadSessionByID returns an auth session from database.
LoadSessionsByConsumerIDs returns all auth sessions from database for given consumer ids.
LoadUserConsumerByID returns an auth consumer from database.
LoadUserConsumerByTypeAndUserExternalID returns an auth consumer from database for given type and user id.
LoadUserConsumerByTypeAndUserID returns an auth consumer from database for given type and user id.
LoadUserConsumersByGroupID returns all consumers from database that refer to given group id.
LoadUserConsumersByUserID returns auth consumers from database for given user id.
NewConsumerExternal returns a new local consumer for given data.
NewDefaultSigninStateToken returns a jws used for signin request.
NewSession returns a new session for a given auth consumer.
NewSessionJWT generate a signed token for given auth session.
NewSessionWithMFA returns a new session for a given auth consumer with MFA.
NewSessionWithMFACustomDuration returns a new session for a given auth consumer with MFA and custom MFA duration.
NewSessionXSRFToken generate and store a XSRF token for a given session id.
SessionCleaner must be run as a goroutine.
SetSessionActivity store activity in cache for given session.
UnsafeLoadCorruptedSessions should not be used.
UpdateConsumerLastAuthentication updates only the column last_authentication.
UpdateUserConsumer in database.

# Variables

LoadUserConsumerOptions provides all options on auth consumer loads functions.

# Structs

# Type aliases

LoadSessionOptionFunc for auth session.
LoadUserConsumerOptionFunc for auth consumer.