# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# 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.
No description provided by the author
GetSessionActivity returns if given session is active.
GetSessionXSRFToken returns a XSRF token from cache if exists for given session.
No description provided by the author
No description provided by the author
Init the package by passing the signing key.
InsertHatcheryConsumer in database.
InsertSession in database.
InsertUserConsumer in database.
No description provided by the author
LoadExpiredSessions returns all expired session.
No description provided by the author
No description provided by the author
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.
No description provided by the author
No description provided by the author
No description provided by the author
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.
No description provided by the author
No description provided by the author
UnsafeLoadCorruptedSessions should not be used.
UpdateConsumerLastAuthentication updates only the column last_authentication.
No description provided by the author
UpdateUserConsumer in database.
No description provided by the author
No description provided by the author
# Variables
LoadUserConsumerOptions provides all options on auth consumer loads functions.
# Type aliases
LoadSessionOptionFunc for auth session.
LoadUserConsumerOptionFunc for auth consumer.