Documentation
¶
Overview ¶
Package memory provides an in-memory repository implementation suitable for development and testing.
Index ¶
- type Store
- func (s *Store) AddTeamMember(ctx context.Context, teamMember *organization.TeamMember) error
- func (s *Store) ConsumeAuthorizationCode(ctx context.Context, code string) (*oauth2.OAuthAuthorizationCode, error)
- func (s *Store) ConsumePasskeyChallenge(ctx context.Context, token string) (*passkey.PasskeyChallenge, error)
- func (s *Store) CountMembers(ctx context.Context, orgID string) (int, error)
- func (s *Store) CountMembersByRole(ctx context.Context, orgID, role string) (int, error)
- func (s *Store) CountPendingInvitations(ctx context.Context, orgID string) (int, error)
- func (s *Store) CountRoles(ctx context.Context, orgID string) (int, error)
- func (s *Store) CountTeamMembers(ctx context.Context, teamID string) (int, error)
- func (s *Store) CountTeams(ctx context.Context, orgID string) (int, error)
- func (s *Store) Create(ctx context.Context, tf *twofactor.TwoFactor) error
- func (s *Store) CreateAccessToken(ctx context.Context, token *oauth2.OAuthAccessToken) error
- func (s *Store) CreateAccount(ctx context.Context, params *dto.CreateAccountParams) error
- func (s *Store) CreateAuthorizationCode(ctx context.Context, code *oauth2.OAuthAuthorizationCode) error
- func (s *Store) CreateClient(ctx context.Context, client *oauth2.OAuthClient) error
- func (s *Store) CreateConsent(ctx context.Context, consent *oauth2.OAuthConsent) error
- func (s *Store) CreateInvitation(ctx context.Context, invitation *organization.Invitation) error
- func (s *Store) CreateKey(ctx context.Context, record *jwt.JWKRecord) error
- func (s *Store) CreateMember(ctx context.Context, member *organization.Member) error
- func (s *Store) CreateOrganization(ctx context.Context, org *organization.Organization) error
- func (s *Store) CreatePasskey(ctx context.Context, pk *entity.Passkey) error
- func (s *Store) CreateRefreshToken(ctx context.Context, token *oauth2.OAuthRefreshToken) error
- func (s *Store) CreateRole(ctx context.Context, role *organization.OrganizationRole) error
- func (s *Store) CreateSession(ctx context.Context, session *dto.CreateSessionParams) (*entity.Session, error)
- func (s *Store) CreateTeam(ctx context.Context, team *organization.Team) error
- func (s *Store) CreateUser(ctx context.Context, params *dto.CreateUserParams) (*entity.User, error)
- func (s *Store) CreateVerificationToken(ctx context.Context, token *entity.VerificationToken) error
- func (s *Store) DeleteAccessToken(ctx context.Context, tokenHash string) error
- func (s *Store) DeleteByUserID(ctx context.Context, userID string) error
- func (s *Store) DeleteChallenge(ctx context.Context, token string) error
- func (s *Store) DeleteClient(ctx context.Context, clientID string) error
- func (s *Store) DeleteConsent(ctx context.Context, id string) error
- func (s *Store) DeleteInvitation(ctx context.Context, id string) error
- func (s *Store) DeleteKey(ctx context.Context, id string) error
- func (s *Store) DeleteMember(ctx context.Context, orgID, userID string) error
- func (s *Store) DeleteOTPChallenge(ctx context.Context, key string) error
- func (s *Store) DeleteOrganization(ctx context.Context, id string) error
- func (s *Store) DeletePasskey(ctx context.Context, id string) error
- func (s *Store) DeletePasskeyChallenge(ctx context.Context, token string) error
- func (s *Store) DeletePasskeysByUserID(ctx context.Context, userID string) error
- func (s *Store) DeleteRefreshToken(ctx context.Context, tokenHash string) error
- func (s *Store) DeleteRole(ctx context.Context, id string) error
- func (s *Store) DeleteSession(ctx context.Context, token string) error
- func (s *Store) DeleteSessionByID(ctx context.Context, sessionID string) error
- func (s *Store) DeleteSessions(ctx context.Context, tokens []string) error
- func (s *Store) DeleteSessionsByUserID(ctx context.Context, userID string) error
- func (s *Store) DeleteTeam(ctx context.Context, id string) error
- func (s *Store) DeleteTrustDevice(ctx context.Context, userID, deviceID string) error
- func (s *Store) DeleteTrustDevicesByUserID(ctx context.Context, userID string) error
- func (s *Store) DeleteUser(ctx context.Context, id string) error
- func (s *Store) DeleteVerificationToken(ctx context.Context, token string) error
- func (s *Store) FindAccessToken(ctx context.Context, tokenHash string) (*oauth2.OAuthAccessToken, error)
- func (s *Store) FindByUserID(ctx context.Context, userID string) (*twofactor.TwoFactor, error)
- func (s *Store) FindClientByClientID(ctx context.Context, clientID string) (*oauth2.OAuthClient, error)
- func (s *Store) FindClientByID(ctx context.Context, id string) (*oauth2.OAuthClient, error)
- func (s *Store) FindConsent(ctx context.Context, clientID, userID string) (*oauth2.OAuthConsent, error)
- func (s *Store) FindRefreshToken(ctx context.Context, tokenHash string) (*oauth2.OAuthRefreshToken, error)
- func (s *Store) FindSessionByID(ctx context.Context, sessionID string) (*entity.Session, error)
- func (s *Store) FindSessionsByTokens(ctx context.Context, tokens []string) ([]*entity.Session, []*entity.User, error)
- func (s *Store) FindTrustDevice(ctx context.Context, userID, deviceID string) (*twofactor.TrustDeviceRecord, error)
- func (s *Store) FindUserByID(ctx context.Context, userID string) (*entity.User, error)
- func (s *Store) GetAccountByUserIDAndProvider(ctx context.Context, userID, provider string) (*entity.Account, error)
- func (s *Store) GetAllKeys(ctx context.Context) ([]*jwt.JWKRecord, error)
- func (s *Store) GetChallenge(ctx context.Context, token string) (*twofactor.ChallengeRecord, error)
- func (s *Store) GetInvitationByID(ctx context.Context, id string) (*organization.Invitation, error)
- func (s *Store) GetKeyByID(ctx context.Context, id string) (*jwt.JWKRecord, error)
- func (s *Store) GetLastLoginMethod(ctx context.Context, userID string) (string, error)
- func (s *Store) GetLatestKey(ctx context.Context) (*jwt.JWKRecord, error)
- func (s *Store) GetMember(ctx context.Context, orgID, userID string) (*organization.Member, error)
- func (s *Store) GetMemberByID(ctx context.Context, memberID string) (*organization.Member, error)
- func (s *Store) GetOTPChallenge(ctx context.Context, key string) (*twofactor.OTPChallenge, error)
- func (s *Store) GetOrganizationByID(ctx context.Context, id string) (*organization.Organization, error)
- func (s *Store) GetOrganizationBySlug(ctx context.Context, slug string) (*organization.Organization, error)
- func (s *Store) GetPasskeyByCredentialID(ctx context.Context, credentialID string) (*entity.Passkey, error)
- func (s *Store) GetPasskeyByID(ctx context.Context, id string) (*entity.Passkey, error)
- func (s *Store) GetPasskeyChallenge(ctx context.Context, token string) (*passkey.PasskeyChallenge, error)
- func (s *Store) GetPendingInvitation(ctx context.Context, orgID, email string) (*organization.Invitation, error)
- func (s *Store) GetRoleByID(ctx context.Context, id string) (*organization.OrganizationRole, error)
- func (s *Store) GetRoleByName(ctx context.Context, orgID, roleName string) (*organization.OrganizationRole, error)
- func (s *Store) GetSessionByToken(ctx context.Context, token string) (*entity.Session, error)
- func (s *Store) GetTOTPSecret(ctx context.Context, userID string) (string, error)
- func (s *Store) GetTeamByID(ctx context.Context, id string) (*organization.Team, error)
- func (s *Store) GetTeamMember(ctx context.Context, teamID, userID string) (*organization.TeamMember, error)
- func (s *Store) GetUserByEmail(ctx context.Context, email string) (*entity.User, error)
- func (s *Store) GetUserByID(ctx context.Context, id string) (*entity.User, error)
- func (s *Store) GetVerificationToken(ctx context.Context, token string) (*entity.VerificationToken, error)
- func (s *Store) LinkCredentialAccount(ctx context.Context, userID, passwordHash string) error
- func (s *Store) ListClientsByUserID(ctx context.Context, userID string) ([]*oauth2.OAuthClient, error)
- func (s *Store) ListConsentsByUserID(ctx context.Context, userID string) ([]*oauth2.OAuthConsent, error)
- func (s *Store) ListInvitationsByEmail(ctx context.Context, email string, status *organization.InvitationStatus) ([]*organization.Invitation, error)
- func (s *Store) ListInvitationsByOrgID(ctx context.Context, orgID string, status *organization.InvitationStatus) ([]*organization.Invitation, error)
- func (s *Store) ListMembers(ctx context.Context, orgID string, limit, offset int) ([]*organization.Member, int, error)
- func (s *Store) ListOrganizationsByUserID(ctx context.Context, userID string) ([]*organization.Organization, error)
- func (s *Store) ListPasskeysByUserID(ctx context.Context, userID string) ([]*entity.Passkey, error)
- func (s *Store) ListRolesByOrgID(ctx context.Context, orgID string) ([]*organization.OrganizationRole, error)
- func (s *Store) ListSessionsByUserID(ctx context.Context, userID string) ([]*entity.Session, error)
- func (s *Store) ListTeamMembers(ctx context.Context, teamID string) ([]*organization.TeamMember, error)
- func (s *Store) ListTeamsByOrgID(ctx context.Context, orgID string) ([]*organization.Team, error)
- func (s *Store) ListTeamsByUserID(ctx context.Context, orgID, userID string) ([]*organization.Team, error)
- func (s *Store) ListUsers(ctx context.Context, filter admin.ListUsersFilter) ([]*entity.User, int64, error)
- func (s *Store) RemoveTeamMember(ctx context.Context, teamID, userID string) error
- func (s *Store) RevokeRefreshTokenFamily(ctx context.Context, familyID string) error
- func (s *Store) SaveChallenge(ctx context.Context, challenge *twofactor.ChallengeRecord) error
- func (s *Store) SaveOTPChallenge(ctx context.Context, challenge *twofactor.OTPChallenge) error
- func (s *Store) SavePasskeyChallenge(ctx context.Context, challenge *passkey.PasskeyChallenge) error
- func (s *Store) SaveSession(session *entity.Session)
- func (s *Store) SaveTOTPSecret(ctx context.Context, userID string, secret string) error
- func (s *Store) SaveTrustDevice(ctx context.Context, record *twofactor.TrustDeviceRecord) error
- func (s *Store) Update(ctx context.Context, tf *twofactor.TwoFactor) error
- func (s *Store) UpdateAccountPassword(ctx context.Context, accountID, hashedPassword string) error
- func (s *Store) UpdateClient(ctx context.Context, client *oauth2.OAuthClient) error
- func (s *Store) UpdateConsent(ctx context.Context, consent *oauth2.OAuthConsent) error
- func (s *Store) UpdateInvitation(ctx context.Context, invitation *organization.Invitation) error
- func (s *Store) UpdateLastLoginMethod(ctx context.Context, userID string, method string) error
- func (s *Store) UpdateMember(ctx context.Context, member *organization.Member) error
- func (s *Store) UpdateOrganization(ctx context.Context, org *organization.Organization) error
- func (s *Store) UpdatePasskey(ctx context.Context, pk *entity.Passkey) error
- func (s *Store) UpdatePasskeyCounter(ctx context.Context, id string, newCounter uint32) error
- func (s *Store) UpdateRole(ctx context.Context, role *organization.OrganizationRole) error
- func (s *Store) UpdateTeam(ctx context.Context, team *organization.Team) error
- func (s *Store) UpdateUser(ctx context.Context, user *entity.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a thread-safe in-memory implementation of authentication storage interfaces.
func (*Store) AddTeamMember ¶ added in v0.6.0
func (s *Store) AddTeamMember(ctx context.Context, teamMember *organization.TeamMember) error
func (*Store) ConsumeAuthorizationCode ¶ added in v0.11.0
func (*Store) ConsumePasskeyChallenge ¶ added in v0.9.0
func (*Store) CountMembers ¶ added in v0.6.0
func (*Store) CountMembersByRole ¶ added in v0.6.0
func (*Store) CountPendingInvitations ¶ added in v0.6.0
func (*Store) CountRoles ¶ added in v0.6.0
func (*Store) CountTeamMembers ¶ added in v0.6.0
func (*Store) CountTeams ¶ added in v0.6.0
func (*Store) CreateAccessToken ¶ added in v0.11.0
func (*Store) CreateAccount ¶
Account Methods
func (*Store) CreateAuthorizationCode ¶ added in v0.11.0
func (*Store) CreateClient ¶ added in v0.11.0
func (*Store) CreateConsent ¶ added in v0.11.0
func (*Store) CreateInvitation ¶ added in v0.6.0
func (s *Store) CreateInvitation(ctx context.Context, invitation *organization.Invitation) error
func (*Store) CreateMember ¶ added in v0.6.0
func (*Store) CreateOrganization ¶ added in v0.6.0
func (s *Store) CreateOrganization(ctx context.Context, org *organization.Organization) error
func (*Store) CreatePasskey ¶ added in v0.9.0
func (*Store) CreateRefreshToken ¶ added in v0.11.0
func (*Store) CreateRole ¶ added in v0.6.0
func (s *Store) CreateRole(ctx context.Context, role *organization.OrganizationRole) error
func (*Store) CreateSession ¶
func (s *Store) CreateSession(ctx context.Context, session *dto.CreateSessionParams) (*entity.Session, error)
Session Methods
func (*Store) CreateTeam ¶ added in v0.6.0
func (*Store) CreateUser ¶
User Methods
func (*Store) CreateVerificationToken ¶
Verification Token Methods
func (*Store) DeleteAccessToken ¶ added in v0.11.0
func (*Store) DeleteByUserID ¶
func (*Store) DeleteChallenge ¶ added in v0.7.0
func (*Store) DeleteClient ¶ added in v0.11.0
func (*Store) DeleteConsent ¶ added in v0.11.0
func (*Store) DeleteInvitation ¶ added in v0.6.0
func (*Store) DeleteMember ¶ added in v0.6.0
func (*Store) DeleteOTPChallenge ¶
func (*Store) DeleteOrganization ¶ added in v0.6.0
func (*Store) DeletePasskey ¶ added in v0.9.0
func (*Store) DeletePasskeyChallenge ¶ added in v0.9.0
func (*Store) DeletePasskeysByUserID ¶ added in v0.9.0
func (*Store) DeleteRefreshToken ¶ added in v0.11.0
func (*Store) DeleteRole ¶ added in v0.6.0
func (*Store) DeleteSession ¶
func (*Store) DeleteSessionByID ¶ added in v0.11.0
func (*Store) DeleteSessions ¶ added in v0.23.0
func (*Store) DeleteSessionsByUserID ¶ added in v0.8.0
func (*Store) DeleteTeam ¶ added in v0.6.0
func (*Store) DeleteTrustDevice ¶ added in v0.7.0
func (*Store) DeleteTrustDevicesByUserID ¶ added in v0.7.0
func (*Store) DeleteUser ¶ added in v0.8.0
func (*Store) DeleteVerificationToken ¶
func (*Store) FindAccessToken ¶ added in v0.11.0
func (*Store) FindByUserID ¶
func (*Store) FindClientByClientID ¶ added in v0.11.0
func (*Store) FindClientByID ¶ added in v0.11.0
func (*Store) FindConsent ¶ added in v0.11.0
func (*Store) FindRefreshToken ¶ added in v0.11.0
func (*Store) FindSessionByID ¶ added in v0.11.0
func (*Store) FindSessionsByTokens ¶ added in v0.23.0
func (*Store) FindTrustDevice ¶ added in v0.7.0
func (*Store) FindUserByID ¶ added in v0.11.0
func (*Store) GetAccountByUserIDAndProvider ¶
func (*Store) GetAllKeys ¶ added in v0.5.0
func (*Store) GetChallenge ¶ added in v0.7.0
func (*Store) GetInvitationByID ¶ added in v0.6.0
func (s *Store) GetInvitationByID(ctx context.Context, id string) (*organization.Invitation, error)
func (*Store) GetKeyByID ¶ added in v0.5.0
func (*Store) GetLastLoginMethod ¶ added in v0.24.0
func (*Store) GetLatestKey ¶ added in v0.5.0
JWKS Methods (jwt.Repository)
func (*Store) GetMemberByID ¶ added in v0.6.0
func (*Store) GetOTPChallenge ¶
func (*Store) GetOrganizationByID ¶ added in v0.6.0
func (s *Store) GetOrganizationByID(ctx context.Context, id string) (*organization.Organization, error)
func (*Store) GetOrganizationBySlug ¶ added in v0.6.0
func (s *Store) GetOrganizationBySlug(ctx context.Context, slug string) (*organization.Organization, error)
func (*Store) GetPasskeyByCredentialID ¶ added in v0.9.0
func (*Store) GetPasskeyByID ¶ added in v0.9.0
func (*Store) GetPasskeyChallenge ¶ added in v0.9.0
func (*Store) GetPendingInvitation ¶ added in v0.6.0
func (s *Store) GetPendingInvitation(ctx context.Context, orgID, email string) (*organization.Invitation, error)
func (*Store) GetRoleByID ¶ added in v0.6.0
func (s *Store) GetRoleByID(ctx context.Context, id string) (*organization.OrganizationRole, error)
func (*Store) GetRoleByName ¶ added in v0.6.0
func (s *Store) GetRoleByName(ctx context.Context, orgID, roleName string) (*organization.OrganizationRole, error)
func (*Store) GetSessionByToken ¶
func (*Store) GetTOTPSecret ¶
func (*Store) GetTeamByID ¶ added in v0.6.0
func (*Store) GetTeamMember ¶ added in v0.6.0
func (s *Store) GetTeamMember(ctx context.Context, teamID, userID string) (*organization.TeamMember, error)
func (*Store) GetUserByEmail ¶
func (*Store) GetUserByID ¶
func (*Store) GetVerificationToken ¶
func (*Store) LinkCredentialAccount ¶ added in v0.8.0
func (*Store) ListClientsByUserID ¶ added in v0.11.0
func (*Store) ListConsentsByUserID ¶ added in v0.11.0
func (*Store) ListInvitationsByEmail ¶ added in v0.6.0
func (s *Store) ListInvitationsByEmail(ctx context.Context, email string, status *organization.InvitationStatus) ([]*organization.Invitation, error)
func (*Store) ListInvitationsByOrgID ¶ added in v0.6.0
func (s *Store) ListInvitationsByOrgID(ctx context.Context, orgID string, status *organization.InvitationStatus) ([]*organization.Invitation, error)
func (*Store) ListMembers ¶ added in v0.6.0
func (*Store) ListOrganizationsByUserID ¶ added in v0.6.0
func (s *Store) ListOrganizationsByUserID(ctx context.Context, userID string) ([]*organization.Organization, error)
func (*Store) ListPasskeysByUserID ¶ added in v0.9.0
func (*Store) ListRolesByOrgID ¶ added in v0.6.0
func (s *Store) ListRolesByOrgID(ctx context.Context, orgID string) ([]*organization.OrganizationRole, error)
func (*Store) ListSessionsByUserID ¶ added in v0.8.0
func (*Store) ListTeamMembers ¶ added in v0.6.0
func (s *Store) ListTeamMembers(ctx context.Context, teamID string) ([]*organization.TeamMember, error)
func (*Store) ListTeamsByOrgID ¶ added in v0.6.0
func (*Store) ListTeamsByUserID ¶ added in v0.6.0
func (*Store) RemoveTeamMember ¶ added in v0.6.0
func (*Store) RevokeRefreshTokenFamily ¶ added in v0.11.0
func (*Store) SaveChallenge ¶ added in v0.7.0
Challenge Methods (twofactor.Repository)
func (*Store) SaveOTPChallenge ¶
func (*Store) SavePasskeyChallenge ¶ added in v0.9.0
func (*Store) SaveSession ¶ added in v0.11.0
func (*Store) SaveTOTPSecret ¶
2FA TOTP Methods
func (*Store) SaveTrustDevice ¶ added in v0.7.0
Trusted Devices Methods (twofactor.Repository)
func (*Store) UpdateAccountPassword ¶
func (*Store) UpdateClient ¶ added in v0.11.0
func (*Store) UpdateConsent ¶ added in v0.11.0
func (*Store) UpdateInvitation ¶ added in v0.6.0
func (s *Store) UpdateInvitation(ctx context.Context, invitation *organization.Invitation) error
func (*Store) UpdateLastLoginMethod ¶ added in v0.24.0
func (*Store) UpdateMember ¶ added in v0.6.0
func (*Store) UpdateOrganization ¶ added in v0.6.0
func (s *Store) UpdateOrganization(ctx context.Context, org *organization.Organization) error
func (*Store) UpdatePasskey ¶ added in v0.9.0
func (*Store) UpdatePasskeyCounter ¶ added in v0.9.0
func (*Store) UpdateRole ¶ added in v0.6.0
func (s *Store) UpdateRole(ctx context.Context, role *organization.OrganizationRole) error
func (*Store) UpdateTeam ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.