Documentation
¶
Index ¶
- Variables
- type FSAPIKeyStore
- func (s *FSAPIKeyStore) CleanupExpiredAPIKeys(ctx context.Context, req *core.CleanupExpiredAPIKeysRequest) (*core.CleanupExpiredAPIKeysResponse, error)
- func (s *FSAPIKeyStore) CreateAPIKey(ctx context.Context, req *core.CreateAPIKeyRequest) (*core.CreateAPIKeyResponse, error)
- func (s *FSAPIKeyStore) GetAPIKeyByID(ctx context.Context, req *core.GetAPIKeyByIDRequest) (*core.GetAPIKeyByIDResponse, error)
- func (s *FSAPIKeyStore) ListAPIKeys(ctx context.Context, req *core.ListAPIKeysRequest) (*core.ListAPIKeysResponse, error)
- func (s *FSAPIKeyStore) ListSubjectAPIKeys(ctx context.Context, req *core.ListSubjectAPIKeysRequest) (*core.ListSubjectAPIKeysResponse, error)
- func (s *FSAPIKeyStore) RevokeAPIKey(ctx context.Context, req *core.RevokeAPIKeyRequest) (*core.RevokeAPIKeyResponse, error)
- func (s *FSAPIKeyStore) UpdateAPIKeyLastUsed(ctx context.Context, req *core.UpdateAPIKeyLastUsedRequest) (*core.UpdateAPIKeyLastUsedResponse, error)
- func (s *FSAPIKeyStore) ValidateAPIKey(ctx context.Context, req *core.ValidateAPIKeyRequest) (*core.ValidateAPIKeyResponse, error)
- type FSAppStore
- func (s *FSAppStore) DeleteApp(ctx context.Context, req *core.DeleteAppRequest) (*core.DeleteAppResponse, error)
- func (s *FSAppStore) GetApp(ctx context.Context, req *core.GetAppRequest) (*core.GetAppResponse, error)
- func (s *FSAppStore) ListApps(ctx context.Context, req *core.ListAppsRequest) (*core.ListAppsResponse, error)
- func (s *FSAppStore) SaveApp(ctx context.Context, req *core.SaveAppRequest) (*core.SaveAppResponse, error)
- type FSAuthorizationCodeStore
- func (s *FSAuthorizationCodeStore) CleanupExpired(_ context.Context, _ *core.CleanupExpiredAuthorizationCodesRequest) (*core.CleanupExpiredAuthorizationCodesResponse, error)
- func (s *FSAuthorizationCodeStore) ConsumeAuthorizationCode(_ context.Context, req *core.ConsumeAuthorizationCodeRequest) (*core.ConsumeAuthorizationCodeResponse, error)
- func (s *FSAuthorizationCodeStore) CreateAuthorizationCode(_ context.Context, req *core.CreateAuthorizationCodeRequest) (*core.CreateAuthorizationCodeResponse, error)
- func (s *FSAuthorizationCodeStore) DeleteAuthorizationCode(_ context.Context, req *core.DeleteAuthorizationCodeRequest) (*core.DeleteAuthorizationCodeResponse, error)
- func (s *FSAuthorizationCodeStore) GetAuthorizationCode(_ context.Context, req *core.GetAuthorizationCodeRequest) (*core.GetAuthorizationCodeResponse, error)
- func (s *FSAuthorizationCodeStore) RecordAuthorizationCodeTokens(_ context.Context, req *core.RecordAuthorizationCodeTokensRequest) (*core.RecordAuthorizationCodeTokensResponse, error)
- type FSChannelStore
- func (s *FSChannelStore) GetChannel(ctx context.Context, req *accounts.GetChannelRequest) (*accounts.GetChannelResponse, error)
- func (s *FSChannelStore) GetChannelsByIdentity(ctx context.Context, req *accounts.GetChannelsByIdentityRequest) (*accounts.GetChannelsByIdentityResponse, error)
- func (s *FSChannelStore) SaveChannel(ctx context.Context, req *accounts.SaveChannelRequest) (*accounts.SaveChannelResponse, error)
- type FSConsentStore
- func (s *FSConsentStore) GetConsent(_ context.Context, req *core.GetConsentRequest) (*core.GetConsentResponse, error)
- func (s *FSConsentStore) ListConsents(_ context.Context, req *core.ListConsentsRequest) (*core.ListConsentsResponse, error)
- func (s *FSConsentStore) RevokeConsent(_ context.Context, req *core.RevokeConsentRequest) (*core.RevokeConsentResponse, error)
- func (s *FSConsentStore) SaveConsent(_ context.Context, req *core.SaveConsentRequest) (*core.SaveConsentResponse, error)
- type FSDeviceAuthorizationStore
- func (s *FSDeviceAuthorizationStore) ApproveDeviceAuthorization(_ context.Context, req *core.ApproveDeviceAuthorizationRequest) (*core.ApproveDeviceAuthorizationResponse, error)
- func (s *FSDeviceAuthorizationStore) CleanupExpired(_ context.Context, _ *core.CleanupExpiredDeviceAuthsRequest) (*core.CleanupExpiredDeviceAuthsResponse, error)
- func (s *FSDeviceAuthorizationStore) CreateDeviceAuthorization(_ context.Context, req *core.CreateDeviceAuthorizationRequest) (*core.CreateDeviceAuthorizationResponse, error)
- func (s *FSDeviceAuthorizationStore) DeleteDeviceAuthorization(_ context.Context, req *core.DeleteDeviceAuthorizationRequest) (*core.DeleteDeviceAuthorizationResponse, error)
- func (s *FSDeviceAuthorizationStore) DenyDeviceAuthorization(_ context.Context, req *core.DenyDeviceAuthorizationRequest) (*core.DenyDeviceAuthorizationResponse, error)
- func (s *FSDeviceAuthorizationStore) GetByDeviceCode(_ context.Context, req *core.GetByDeviceCodeRequest) (*core.GetByDeviceCodeResponse, error)
- func (s *FSDeviceAuthorizationStore) GetByUserCode(_ context.Context, req *core.GetByUserCodeRequest) (*core.GetByUserCodeResponse, error)
- func (s *FSDeviceAuthorizationStore) UpdatePollingState(_ context.Context, req *core.UpdatePollingStateRequest) (*core.UpdatePollingStateResponse, error)
- type FSIdentityStore
- func (s *FSIdentityStore) GetIdentity(ctx context.Context, req *accounts.GetIdentityRequest) (*accounts.GetIdentityResponse, error)
- func (s *FSIdentityStore) GetUserIdentities(ctx context.Context, req *accounts.GetUserIdentitiesRequest) (*accounts.GetUserIdentitiesResponse, error)
- func (s *FSIdentityStore) MarkIdentityVerified(ctx context.Context, req *accounts.MarkIdentityVerifiedRequest) (*accounts.MarkIdentityVerifiedResponse, error)
- func (s *FSIdentityStore) SaveIdentity(ctx context.Context, req *accounts.SaveIdentityRequest) (*accounts.SaveIdentityResponse, error)
- func (s *FSIdentityStore) SetUserForIdentity(ctx context.Context, req *accounts.SetUserForIdentityRequest) (*accounts.SetUserForIdentityResponse, error)
- type FSKeyStore
- func (s *FSKeyStore) DeleteKey(ctx context.Context, req *keys.DeleteKeyRequest) (*keys.DeleteKeyResponse, error)
- func (s *FSKeyStore) GetKey(ctx context.Context, req *keys.GetKeyRequest) (*keys.GetKeyResponse, error)
- func (s *FSKeyStore) GetKeyByKid(ctx context.Context, req *keys.GetKeyByKidRequest) (*keys.GetKeyByKidResponse, error)
- func (s *FSKeyStore) ListKeyIDs(ctx context.Context, req *keys.ListKeyIDsRequest) (*keys.ListKeyIDsResponse, error)
- func (s *FSKeyStore) PutKey(ctx context.Context, req *keys.PutKeyRequest) (*keys.PutKeyResponse, error)
- type FSKidStore
- func (s *FSKidStore) Add(ctx context.Context, req *keys.AddKidRequest) (*keys.AddKidResponse, error)
- func (s *FSKidStore) CleanExpired(ctx context.Context, req *keys.CleanExpiredRequest) (*keys.CleanExpiredResponse, error)
- func (s *FSKidStore) GetKey(ctx context.Context, req *keys.GetKeyRequest) (*keys.GetKeyResponse, error)
- func (s *FSKidStore) GetKeyByKid(ctx context.Context, req *keys.GetKeyByKidRequest) (*keys.GetKeyByKidResponse, error)
- func (s *FSKidStore) ListKids(ctx context.Context, req *keys.ListKidsRequest) (*keys.ListKidsResponse, error)
- func (s *FSKidStore) Remove(ctx context.Context, req *keys.RemoveKidRequest) (*keys.RemoveKidResponse, error)
- type FSPushedAuthorizationRequestStore
- func (s *FSPushedAuthorizationRequestStore) CleanupExpiredPushedRequests(_ context.Context, _ *core.CleanupExpiredPushedRequestsRequest) (*core.CleanupExpiredPushedRequestsResponse, error)
- func (s *FSPushedAuthorizationRequestStore) ConsumePushedAuthorizationRequest(_ context.Context, req *core.ConsumePushedAuthorizationRequestRequest) (*core.ConsumePushedAuthorizationRequestResponse, error)
- func (s *FSPushedAuthorizationRequestStore) CreatePushedAuthorizationRequest(_ context.Context, req *core.CreatePushedAuthorizationRequestRequest) (*core.CreatePushedAuthorizationRequestResponse, error)
- func (s *FSPushedAuthorizationRequestStore) DeletePushedAuthorizationRequest(_ context.Context, req *core.DeletePushedAuthorizationRequestRequest) (*core.DeletePushedAuthorizationRequestResponse, error)
- func (s *FSPushedAuthorizationRequestStore) GetPushedAuthorizationRequest(_ context.Context, req *core.GetPushedAuthorizationRequestRequest) (*core.GetPushedAuthorizationRequestResponse, error)
- type FSRefreshTokenStore
- func (s *FSRefreshTokenStore) CleanupExpiredTokens(ctx context.Context, req *core.CleanupExpiredTokensRequest) (*core.CleanupExpiredTokensResponse, error)
- func (s *FSRefreshTokenStore) CreateRefreshToken(ctx context.Context, req *core.CreateRefreshTokenRequest) (*core.CreateRefreshTokenResponse, error)
- func (s *FSRefreshTokenStore) GetRefreshToken(ctx context.Context, req *core.GetRefreshTokenRequest) (*core.GetRefreshTokenResponse, error)
- func (s *FSRefreshTokenStore) GetSubjectTokens(ctx context.Context, req *core.GetSubjectTokensRequest) (*core.GetSubjectTokensResponse, error)
- func (s *FSRefreshTokenStore) RecordAccessToken(ctx context.Context, req *core.RecordAccessTokenRequest) (*core.RecordAccessTokenResponse, error)
- func (s *FSRefreshTokenStore) RevokeRefreshToken(ctx context.Context, req *core.RevokeRefreshTokenRequest) (*core.RevokeRefreshTokenResponse, error)
- func (s *FSRefreshTokenStore) RevokeSubjectTokens(ctx context.Context, req *core.RevokeSubjectTokensRequest) (*core.RevokeSubjectTokensResponse, error)
- func (s *FSRefreshTokenStore) RevokeTokenFamily(ctx context.Context, req *core.RevokeTokenFamilyRequest) (*core.RevokeTokenFamilyResponse, error)
- func (s *FSRefreshTokenStore) RotateRefreshToken(ctx context.Context, req *core.RotateRefreshTokenRequest) (*core.RotateRefreshTokenResponse, error)
- type FSTokenStore
- func (s *FSTokenStore) CreateToken(ctx context.Context, req *localauth.CreateVerificationTokenRequest) (*localauth.CreateVerificationTokenResponse, error)
- func (s *FSTokenStore) DeleteSubjectTokens(ctx context.Context, req *localauth.DeleteSubjectVerificationTokensRequest) (*localauth.DeleteSubjectVerificationTokensResponse, error)
- func (s *FSTokenStore) DeleteToken(ctx context.Context, req *localauth.DeleteVerificationTokenRequest) (*localauth.DeleteVerificationTokenResponse, error)
- func (s *FSTokenStore) GetToken(ctx context.Context, req *localauth.GetVerificationTokenRequest) (*localauth.GetVerificationTokenResponse, error)
- type FSUser
- type FSUserStore
- func (s *FSUserStore) CreateUser(ctx context.Context, req *accounts.CreateUserRequest) (*accounts.CreateUserResponse, error)
- func (s *FSUserStore) GetUserById(ctx context.Context, req *accounts.GetUserByIDRequest) (*accounts.GetUserByIDResponse, error)
- func (s *FSUserStore) SaveUser(ctx context.Context, req *accounts.SaveUserRequest) (*accounts.SaveUserResponse, error)
- type FSUserTokenStore
- func (s *FSUserTokenStore) DeleteUserToken(_ context.Context, req *outbound.DeleteUserTokenRequest) (*outbound.DeleteUserTokenResponse, error)
- func (s *FSUserTokenStore) GetUserToken(_ context.Context, req *outbound.GetUserTokenRequest) (*outbound.GetUserTokenResponse, error)
- func (s *FSUserTokenStore) PutUserToken(_ context.Context, req *outbound.PutUserTokenRequest) (*outbound.PutUserTokenResponse, error)
- type FSUsername
- type FSUsernameStore
- func (s *FSUsernameStore) ChangeUsername(ctx context.Context, req *accounts.ChangeUsernameRequest) (*accounts.ChangeUsernameResponse, error)
- func (s *FSUsernameStore) GetUserByUsername(ctx context.Context, req *accounts.GetUserByUsernameRequest) (*accounts.GetUserByUsernameResponse, error)
- func (s *FSUsernameStore) ReleaseUsername(ctx context.Context, req *accounts.ReleaseUsernameRequest) (*accounts.ReleaseUsernameResponse, error)
- func (s *FSUsernameStore) ReserveUsername(ctx context.Context, req *accounts.ReserveUsernameRequest) (*accounts.ReserveUsernameResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ErrKeyCollision = errors.New("fs: key maps to a file that holds a different record")
ErrKeyCollision is returned by an FS store when the file a key maps to holds a different key's record. File names are derived from keys (filepath.Base, safeName, osFileName), and a case-insensitive file system also ignores letter case, so two keys can map to one file. Returning, overwriting or deleting the other record would hand one account's identity, credentials or keys to another (CWE-706).
Functions ¶
This section is empty.
Types ¶
type FSAPIKeyStore ¶
type FSAPIKeyStore struct {
StoragePath string
// contains filtered or unexported fields
}
FSAPIKeyStore stores API keys as JSON files
func NewFSAPIKeyStore ¶
func NewFSAPIKeyStore(storagePath string) *FSAPIKeyStore
NewFSAPIKeyStore creates a new file-based API key store
func (*FSAPIKeyStore) CleanupExpiredAPIKeys ¶ added in v0.3.17
func (s *FSAPIKeyStore) CleanupExpiredAPIKeys(ctx context.Context, req *core.CleanupExpiredAPIKeysRequest) (*core.CleanupExpiredAPIKeysResponse, error)
CleanupExpiredAPIKeys deletes every key whose ExpiresAt is at or before req.CleanupTime(), revoked or not, and keeps keys with no expiry. A file that's already gone when the delete runs was removed by another handle, so it isn't counted and isn't an error. Removed counts the files this call deleted.
func (*FSAPIKeyStore) CreateAPIKey ¶
func (s *FSAPIKeyStore) CreateAPIKey(ctx context.Context, req *core.CreateAPIKeyRequest) (*core.CreateAPIKeyResponse, error)
func (*FSAPIKeyStore) GetAPIKeyByID ¶
func (s *FSAPIKeyStore) GetAPIKeyByID(ctx context.Context, req *core.GetAPIKeyByIDRequest) (*core.GetAPIKeyByIDResponse, error)
func (*FSAPIKeyStore) ListAPIKeys ¶ added in v0.3.17
func (s *FSAPIKeyStore) ListAPIKeys(ctx context.Context, req *core.ListAPIKeysRequest) (*core.ListAPIKeysResponse, error)
ListAPIKeys returns every key under api_keys/, with KeyHash cleared. A file deleted between the directory read and the file read is another handle's cleanup at work, so the key is left out rather than failing the listing (agni issue 1796). Any other read or decode error fails it. Order is unspecified.
func (*FSAPIKeyStore) ListSubjectAPIKeys ¶ added in v0.1.3
func (s *FSAPIKeyStore) ListSubjectAPIKeys(ctx context.Context, req *core.ListSubjectAPIKeysRequest) (*core.ListSubjectAPIKeysResponse, error)
func (*FSAPIKeyStore) RevokeAPIKey ¶
func (s *FSAPIKeyStore) RevokeAPIKey(ctx context.Context, req *core.RevokeAPIKeyRequest) (*core.RevokeAPIKeyResponse, error)
func (*FSAPIKeyStore) UpdateAPIKeyLastUsed ¶
func (s *FSAPIKeyStore) UpdateAPIKeyLastUsed(ctx context.Context, req *core.UpdateAPIKeyLastUsedRequest) (*core.UpdateAPIKeyLastUsedResponse, error)
func (*FSAPIKeyStore) ValidateAPIKey ¶
func (s *FSAPIKeyStore) ValidateAPIKey(ctx context.Context, req *core.ValidateAPIKeyRequest) (*core.ValidateAPIKeyResponse, error)
type FSAppStore ¶ added in v0.0.81
type FSAppStore struct {
StoragePath string
// contains filtered or unexported fields
}
FSAppStore implements core.AppRegistrationStore by persisting each registration as a JSON file under {basePath}/apps/{client_id}.json.
Mirrors the FSKeyStore design: file-per-record (so concurrent ops don't serialize on a single mutex outside this process), atomic writes via temp-file + rename (so a crash mid-write leaves either the old file or the new file intact, never a half-written one), and safeName guarding path-traversal in client_ids.
In-process concurrency is mediated by sync.RWMutex. Multi-process deployments need a backend with real transaction semantics — see GORMAppStore (#167).
func NewFSAppStore ¶ added in v0.0.81
func NewFSAppStore(storagePath string) *FSAppStore
NewFSAppStore creates a filesystem-backed AppRegistrationStore. The {basePath}/apps/ directory is created lazily on first write.
func (*FSAppStore) DeleteApp ¶ added in v0.0.81
func (s *FSAppStore) DeleteApp(ctx context.Context, req *core.DeleteAppRequest) (*core.DeleteAppResponse, error)
DeleteApp removes the registration for req.ClientID. Returns core.ErrAppNotFound if no such registration exists, matching InMemoryAppStore semantics.
func (*FSAppStore) GetApp ¶ added in v0.0.81
func (s *FSAppStore) GetApp(ctx context.Context, req *core.GetAppRequest) (*core.GetAppResponse, error)
GetApp returns the registration for req.ClientID, or core.ErrAppNotFound if no such file exists. A corrupt JSON file surfaces as a parse error rather than ErrAppNotFound — callers should distinguish "registration absent" from "registration unreadable" so an unexpected on-disk corruption isn't silently treated as a missing client.
func (*FSAppStore) ListApps ¶ added in v0.0.81
func (s *FSAppStore) ListApps(ctx context.Context, req *core.ListAppsRequest) (*core.ListAppsResponse, error)
ListApps returns every registration in the store. Files that fail to parse are skipped (with no error returned) so a single hand-corrupted file does not lock out admin tooling — partial recovery beats total failure here. Callers needing strict integrity should validate at the store level (e.g., periodic fsck) rather than relying on ListApps.
Returns an empty slice (not an error) when the apps dir does not yet exist, matching the InMemory backend's "fresh store has no apps" shape.
func (*FSAppStore) SaveApp ¶ added in v0.0.81
func (s *FSAppStore) SaveApp(ctx context.Context, req *core.SaveAppRequest) (*core.SaveAppResponse, error)
SaveApp persists req.App to disk. Overwrites any existing registration with the same client_id. Empty client_id is rejected.
type FSAuthorizationCodeStore ¶ added in v0.3.7
type FSAuthorizationCodeStore struct {
StoragePath string
// contains filtered or unexported fields
}
FSAuthorizationCodeStore keeps RFC 6749 §4.1 authorization codes as one JSON file each under <StoragePath>/authorization_codes/.
Files are named by core.AtRestKey(code), and the JSON leaves the code out, so a copy of the directory can't redeem a code. Lookups hash the presented code to find its file.
A mutex covers every read-modify-write, so ConsumeAuthorizationCode and RecordAuthorizationCodeTokens are atomic against each other within one process, as the AuthorizationCodeStore contract needs for reuse detection. Two processes sharing the directory are not covered; replicas need the GORM or GAE store.
func NewFSAuthorizationCodeStore ¶ added in v0.3.7
func NewFSAuthorizationCodeStore(storagePath string) *FSAuthorizationCodeStore
NewFSAuthorizationCodeStore returns a store rooted at storagePath. The directory is created on first write.
func (*FSAuthorizationCodeStore) CleanupExpired ¶ added in v0.3.7
func (s *FSAuthorizationCodeStore) CleanupExpired(_ context.Context, _ *core.CleanupExpiredAuthorizationCodesRequest) (*core.CleanupExpiredAuthorizationCodesResponse, error)
CleanupExpired removes every record past its RetainUntil: the code's expiry, or for a used code with a recorded token, that token's later expiry. It reads every file, which is fine at FS-store scale. A file that won't parse is left alone and doesn't stop the sweep.
func (*FSAuthorizationCodeStore) ConsumeAuthorizationCode ¶ added in v0.3.7
func (s *FSAuthorizationCodeStore) ConsumeAuthorizationCode(_ context.Context, req *core.ConsumeAuthorizationCodeRequest) (*core.ConsumeAuthorizationCodeResponse, error)
ConsumeAuthorizationCode marks an unused code used and returns the record as it was. For a used code it sets ReuseDetected and returns core.ErrAuthorizationCodeUsed with the record, whose Issued* fields name the tokens to revoke. A missing code is core.ErrAuthorizationCodeNotFound.
func (*FSAuthorizationCodeStore) CreateAuthorizationCode ¶ added in v0.3.7
func (s *FSAuthorizationCodeStore) CreateAuthorizationCode(_ context.Context, req *core.CreateAuthorizationCodeRequest) (*core.CreateAuthorizationCodeResponse, error)
CreateAuthorizationCode stores a new code. A code that already has a file is a generic error, matching the in-memory store: the caller drew it from a CSPRNG, so a collision is a bug rather than a condition.
func (*FSAuthorizationCodeStore) DeleteAuthorizationCode ¶ added in v0.3.7
func (s *FSAuthorizationCodeStore) DeleteAuthorizationCode(_ context.Context, req *core.DeleteAuthorizationCodeRequest) (*core.DeleteAuthorizationCodeResponse, error)
DeleteAuthorizationCode removes the code's file, or returns core.ErrAuthorizationCodeNotFound when there is none, so a caller can tell a second delete from a first.
func (*FSAuthorizationCodeStore) GetAuthorizationCode ¶ added in v0.3.7
func (s *FSAuthorizationCodeStore) GetAuthorizationCode(_ context.Context, req *core.GetAuthorizationCodeRequest) (*core.GetAuthorizationCodeResponse, error)
GetAuthorizationCode returns the record or core.ErrAuthorizationCodeNotFound. It doesn't filter by expiry, so the token endpoint can tell an expired code from an unknown one.
func (*FSAuthorizationCodeStore) RecordAuthorizationCodeTokens ¶ added in v0.3.7
func (s *FSAuthorizationCodeStore) RecordAuthorizationCodeTokens(_ context.Context, req *core.RecordAuthorizationCodeTokensRequest) (*core.RecordAuthorizationCodeTokensResponse, error)
RecordAuthorizationCodeTokens stores the tokens a redemption minted and reports ReuseDetected, read under the same lock as the write. A missing code is core.ErrAuthorizationCodeNotFound.
type FSChannelStore ¶
type FSChannelStore struct {
StoragePath string
}
FSChannelStore stores channels as JSON files
func NewFSChannelStore ¶
func NewFSChannelStore(storagePath string) *FSChannelStore
func (*FSChannelStore) GetChannel ¶
func (s *FSChannelStore) GetChannel(ctx context.Context, req *accounts.GetChannelRequest) (*accounts.GetChannelResponse, error)
func (*FSChannelStore) GetChannelsByIdentity ¶
func (s *FSChannelStore) GetChannelsByIdentity(ctx context.Context, req *accounts.GetChannelsByIdentityRequest) (*accounts.GetChannelsByIdentityResponse, error)
func (*FSChannelStore) SaveChannel ¶
func (s *FSChannelStore) SaveChannel(ctx context.Context, req *accounts.SaveChannelRequest) (*accounts.SaveChannelResponse, error)
type FSConsentStore ¶ added in v0.3.8
type FSConsentStore struct {
StoragePath string
// contains filtered or unexported fields
}
FSConsentStore keeps core.ConsentGrants as one JSON file per user and client under <StoragePath>/consents.
Files are named by a hash of subject and client_id, so any characters in either are safe and no key can steer the path. Each file holds the whole grant, key included, and a read that finds another key's grant in the file returns ErrKeyCollision.
A mutex orders writes within one process, and a save replaces the file by rename, so a reader sees the old grant or the new one. Two processes sharing the directory can interleave a save and a revoke; replicas need the GORM or GAE store.
func NewFSConsentStore ¶ added in v0.3.8
func NewFSConsentStore(storagePath string) *FSConsentStore
NewFSConsentStore returns a store rooted at storagePath. The directory is created on first write.
func (*FSConsentStore) GetConsent ¶ added in v0.3.8
func (s *FSConsentStore) GetConsent(_ context.Context, req *core.GetConsentRequest) (*core.GetConsentResponse, error)
GetConsent returns the stored grant, expired or not, decoded fresh from the file. It returns core.ErrConsentNotFound when no file exists, and ErrKeyCollision when the file holds another key's grant.
func (*FSConsentStore) ListConsents ¶ added in v0.3.12
func (s *FSConsentStore) ListConsents(_ context.Context, req *core.ListConsentsRequest) (*core.ListConsentsResponse, error)
ListConsents returns the subject's unexpired grants, sorted by client_id. Files are named by a hash, so it reads every file under consents and keeps those whose grant names req.Subject; the cost grows with every user's grants, which suits the FS store's single-node use. A file whose name isn't the hash of the grant it holds is skipped, as GetConsent would refuse it. A missing directory is an empty list, and an unreadable or corrupt file is an error rather than a silent gap.
func (*FSConsentStore) RevokeConsent ¶ added in v0.3.8
func (s *FSConsentStore) RevokeConsent(_ context.Context, req *core.RevokeConsentRequest) (*core.RevokeConsentResponse, error)
RevokeConsent removes the file. A missing file is not an error, so a second revoke succeeds.
func (*FSConsentStore) SaveConsent ¶ added in v0.3.8
func (s *FSConsentStore) SaveConsent(_ context.Context, req *core.SaveConsentRequest) (*core.SaveConsentResponse, error)
SaveConsent writes req.Grant, replacing any grant for the same subject and client_id. The store keeps a copy, so changing req.Grant afterwards doesn't change what is stored. Empty subject or client_id is an error.
type FSDeviceAuthorizationStore ¶ added in v0.1.23
type FSDeviceAuthorizationStore struct {
StoragePath string
// contains filtered or unexported fields
}
FSDeviceAuthorizationStore persists RFC 8628 device authorizations as per-record JSON files under <storage>/device_authorizations/. Two files are written per record so user_code lookup is also O(1):
<storage>/device_authorizations/dc-<sha256(device_code)>.json <storage>/device_authorizations/uc-<sha256(upper(user_code))>.json
Neither file holds the device code, the credential a device polls the token endpoint with: the record leaves it out, and the user_code pointer holds the record's digest (issue 473). Lookups by device_code hash the presented code; lookups by user_code return DeviceCode empty. Files written before that still hold the code and keep working; each rewrite drops it. A mutex makes approve, deny and polling atomic within one process.
func NewFSDeviceAuthorizationStore ¶ added in v0.1.23
func NewFSDeviceAuthorizationStore(storagePath string) *FSDeviceAuthorizationStore
NewFSDeviceAuthorizationStore returns a store rooted at storagePath.
func (*FSDeviceAuthorizationStore) ApproveDeviceAuthorization ¶ added in v0.1.23
func (s *FSDeviceAuthorizationStore) ApproveDeviceAuthorization(_ context.Context, req *core.ApproveDeviceAuthorizationRequest) (*core.ApproveDeviceAuthorizationResponse, error)
ApproveDeviceAuthorization moves a pending record to approved under the store's lock, so of racing approvals and denials exactly one succeeds. The returned authorization's DeviceCode is empty.
func (*FSDeviceAuthorizationStore) CleanupExpired ¶ added in v0.1.23
func (s *FSDeviceAuthorizationStore) CleanupExpired(_ context.Context, _ *core.CleanupExpiredDeviceAuthsRequest) (*core.CleanupExpiredDeviceAuthsResponse, error)
CleanupExpired removes every expired record and its user_code pointer.
func (*FSDeviceAuthorizationStore) CreateDeviceAuthorization ¶ added in v0.1.23
func (s *FSDeviceAuthorizationStore) CreateDeviceAuthorization(_ context.Context, req *core.CreateDeviceAuthorizationRequest) (*core.CreateDeviceAuthorizationResponse, error)
CreateDeviceAuthorization writes the record and the user_code pointer. A device_code or user_code that already has a file is a generic error, matching the in-memory store: both came from a CSPRNG.
func (*FSDeviceAuthorizationStore) DeleteDeviceAuthorization ¶ added in v0.1.23
func (s *FSDeviceAuthorizationStore) DeleteDeviceAuthorization(_ context.Context, req *core.DeleteDeviceAuthorizationRequest) (*core.DeleteDeviceAuthorizationResponse, error)
DeleteDeviceAuthorization removes the record and its user_code pointer, or returns core.ErrDeviceAuthorizationNotFound.
func (*FSDeviceAuthorizationStore) DenyDeviceAuthorization ¶ added in v0.1.23
func (s *FSDeviceAuthorizationStore) DenyDeviceAuthorization(_ context.Context, req *core.DenyDeviceAuthorizationRequest) (*core.DenyDeviceAuthorizationResponse, error)
DenyDeviceAuthorization moves a pending record to denied under the store's lock.
func (*FSDeviceAuthorizationStore) GetByDeviceCode ¶ added in v0.1.23
func (s *FSDeviceAuthorizationStore) GetByDeviceCode(_ context.Context, req *core.GetByDeviceCodeRequest) (*core.GetByDeviceCodeResponse, error)
GetByDeviceCode returns the record, with DeviceCode filled in from the request, or core.ErrDeviceAuthorizationNotFound. It doesn't filter by status or expiry.
func (*FSDeviceAuthorizationStore) GetByUserCode ¶ added in v0.1.23
func (s *FSDeviceAuthorizationStore) GetByUserCode(_ context.Context, req *core.GetByUserCodeRequest) (*core.GetByUserCodeResponse, error)
GetByUserCode returns the record with DeviceCode empty (see core.DeviceAuthorizationStore), or core.ErrDeviceAuthorizationNotFound.
func (*FSDeviceAuthorizationStore) UpdatePollingState ¶ added in v0.1.23
func (s *FSDeviceAuthorizationStore) UpdatePollingState(_ context.Context, req *core.UpdatePollingStateRequest) (*core.UpdatePollingStateResponse, error)
UpdatePollingState records a poll and returns the record with DeviceCode filled in from the request.
type FSIdentityStore ¶
type FSIdentityStore struct {
StoragePath string
}
FSIdentityStore stores identities as JSON files
func NewFSIdentityStore ¶
func NewFSIdentityStore(storagePath string) *FSIdentityStore
func (*FSIdentityStore) GetIdentity ¶
func (s *FSIdentityStore) GetIdentity(ctx context.Context, req *accounts.GetIdentityRequest) (*accounts.GetIdentityResponse, error)
func (*FSIdentityStore) GetUserIdentities ¶
func (s *FSIdentityStore) GetUserIdentities(ctx context.Context, req *accounts.GetUserIdentitiesRequest) (*accounts.GetUserIdentitiesResponse, error)
func (*FSIdentityStore) MarkIdentityVerified ¶
func (s *FSIdentityStore) MarkIdentityVerified(ctx context.Context, req *accounts.MarkIdentityVerifiedRequest) (*accounts.MarkIdentityVerifiedResponse, error)
func (*FSIdentityStore) SaveIdentity ¶
func (s *FSIdentityStore) SaveIdentity(ctx context.Context, req *accounts.SaveIdentityRequest) (*accounts.SaveIdentityResponse, error)
func (*FSIdentityStore) SetUserForIdentity ¶
func (s *FSIdentityStore) SetUserForIdentity(ctx context.Context, req *accounts.SetUserForIdentityRequest) (*accounts.SetUserForIdentityResponse, error)
type FSKeyStore ¶ added in v0.0.32
type FSKeyStore struct {
StoragePath string
// contains filtered or unexported fields
}
FSKeyStore implements keys.KeyStorage using filesystem storage.
func NewFSKeyStore ¶ added in v0.0.32
func NewFSKeyStore(storagePath string) *FSKeyStore
NewFSKeyStore creates a new filesystem-backed KeyStore.
func (*FSKeyStore) DeleteKey ¶ added in v0.0.32
func (s *FSKeyStore) DeleteKey(ctx context.Context, req *keys.DeleteKeyRequest) (*keys.DeleteKeyResponse, error)
func (*FSKeyStore) GetKey ¶ added in v0.0.38
func (s *FSKeyStore) GetKey(ctx context.Context, req *keys.GetKeyRequest) (*keys.GetKeyResponse, error)
func (*FSKeyStore) GetKeyByKid ¶ added in v0.0.38
func (s *FSKeyStore) GetKeyByKid(ctx context.Context, req *keys.GetKeyByKidRequest) (*keys.GetKeyByKidResponse, error)
func (*FSKeyStore) ListKeyIDs ¶ added in v0.0.38
func (s *FSKeyStore) ListKeyIDs(ctx context.Context, req *keys.ListKeyIDsRequest) (*keys.ListKeyIDsResponse, error)
func (*FSKeyStore) PutKey ¶ added in v0.0.38
func (s *FSKeyStore) PutKey(ctx context.Context, req *keys.PutKeyRequest) (*keys.PutKeyResponse, error)
type FSKidStore ¶ added in v0.0.83
type FSKidStore struct {
StoragePath string
// contains filtered or unexported fields
}
FSKidStore implements keys.KidStorage using filesystem storage.
func NewFSKidStore ¶ added in v0.0.83
func NewFSKidStore(storagePath string) *FSKidStore
NewFSKidStore creates a new filesystem-backed KidStorage.
func (*FSKidStore) Add ¶ added in v0.0.83
func (s *FSKidStore) Add(ctx context.Context, req *keys.AddKidRequest) (*keys.AddKidResponse, error)
func (*FSKidStore) CleanExpired ¶ added in v0.0.83
func (s *FSKidStore) CleanExpired(ctx context.Context, req *keys.CleanExpiredRequest) (*keys.CleanExpiredResponse, error)
func (*FSKidStore) GetKey ¶ added in v0.0.83
func (s *FSKidStore) GetKey(ctx context.Context, req *keys.GetKeyRequest) (*keys.GetKeyResponse, error)
func (*FSKidStore) GetKeyByKid ¶ added in v0.0.83
func (s *FSKidStore) GetKeyByKid(ctx context.Context, req *keys.GetKeyByKidRequest) (*keys.GetKeyByKidResponse, error)
func (*FSKidStore) ListKids ¶ added in v0.3.11
func (s *FSKidStore) ListKids(ctx context.Context, req *keys.ListKidsRequest) (*keys.ListKidsResponse, error)
ListKids implements keys.KidLister: every entry file whose expiry is unset or in the future, so the JWKS endpoint can publish retired keys (issue 421). Unreadable or unparseable files are skipped, as in CleanExpired.
func (*FSKidStore) Remove ¶ added in v0.0.83
func (s *FSKidStore) Remove(ctx context.Context, req *keys.RemoveKidRequest) (*keys.RemoveKidResponse, error)
type FSPushedAuthorizationRequestStore ¶ added in v0.3.7
type FSPushedAuthorizationRequestStore struct {
StoragePath string
// contains filtered or unexported fields
}
FSPushedAuthorizationRequestStore keeps RFC 9126 pushed authorization requests as one JSON file each under <StoragePath>/pushed_authorization_requests/.
Files are named by core.AtRestKey(request_uri) and the JSON leaves the request_uri out, so a copy of the directory can't be used to start an authorization. The payload is stored as url.Values, so extension parameters and authorization_details JSON round-trip verbatim.
A mutex makes ConsumePushedAuthorizationRequest's check-and-mark atomic within one process. Replicas need the GORM or GAE store.
func NewFSPushedAuthorizationRequestStore ¶ added in v0.3.7
func NewFSPushedAuthorizationRequestStore(storagePath string) *FSPushedAuthorizationRequestStore
NewFSPushedAuthorizationRequestStore returns a store rooted at storagePath. The directory is created on first write.
func (*FSPushedAuthorizationRequestStore) CleanupExpiredPushedRequests ¶ added in v0.3.7
func (s *FSPushedAuthorizationRequestStore) CleanupExpiredPushedRequests(_ context.Context, _ *core.CleanupExpiredPushedRequestsRequest) (*core.CleanupExpiredPushedRequestsResponse, error)
CleanupExpiredPushedRequests removes every request past its ExpiresAt, consumed or not, so used requests don't pile up. A file that won't parse is left alone.
func (*FSPushedAuthorizationRequestStore) ConsumePushedAuthorizationRequest ¶ added in v0.3.7
func (s *FSPushedAuthorizationRequestStore) ConsumePushedAuthorizationRequest(_ context.Context, req *core.ConsumePushedAuthorizationRequestRequest) (*core.ConsumePushedAuthorizationRequestResponse, error)
ConsumePushedAuthorizationRequest marks the request used and keeps the file, so a replay reads back as used rather than unknown. Consumed is true for exactly one caller. A missing request is core.ErrPushedRequestNotFound.
func (*FSPushedAuthorizationRequestStore) CreatePushedAuthorizationRequest ¶ added in v0.3.7
func (s *FSPushedAuthorizationRequestStore) CreatePushedAuthorizationRequest(_ context.Context, req *core.CreatePushedAuthorizationRequestRequest) (*core.CreatePushedAuthorizationRequestResponse, error)
CreatePushedAuthorizationRequest stores a new request and returns it. A request_uri that already has a file is a generic error, matching the in-memory store.
func (*FSPushedAuthorizationRequestStore) DeletePushedAuthorizationRequest ¶ added in v0.3.7
func (s *FSPushedAuthorizationRequestStore) DeletePushedAuthorizationRequest(_ context.Context, req *core.DeletePushedAuthorizationRequestRequest) (*core.DeletePushedAuthorizationRequestResponse, error)
DeletePushedAuthorizationRequest removes the file, or returns core.ErrPushedRequestNotFound when there is none.
func (*FSPushedAuthorizationRequestStore) GetPushedAuthorizationRequest ¶ added in v0.3.7
func (s *FSPushedAuthorizationRequestStore) GetPushedAuthorizationRequest(_ context.Context, req *core.GetPushedAuthorizationRequestRequest) (*core.GetPushedAuthorizationRequestResponse, error)
GetPushedAuthorizationRequest returns the record or core.ErrPushedRequestNotFound. It doesn't filter by expiry or consumption, so /authorize can tell a client its reference expired or was used rather than that it never existed.
type FSRefreshTokenStore ¶
type FSRefreshTokenStore struct {
StoragePath string
// contains filtered or unexported fields
}
FSRefreshTokenStore implements core.RefreshTokenStore with one JSON file per refresh token, named by the SHA-256 of the token. One mutex guards every method, so each call is atomic against the others in this process. Two processes sharing StoragePath are not coordinated.
func NewFSRefreshTokenStore ¶
func NewFSRefreshTokenStore(storagePath string) *FSRefreshTokenStore
NewFSRefreshTokenStore returns a store that keeps its files under storagePath/refresh_tokens, creating the directory on first write.
func (*FSRefreshTokenStore) CleanupExpiredTokens ¶
func (s *FSRefreshTokenStore) CleanupExpiredTokens(ctx context.Context, req *core.CleanupExpiredTokensRequest) (*core.CleanupExpiredTokensResponse, error)
CleanupExpiredTokens deletes the files of expired tokens, and of tokens revoked more than 24 hours ago. The grace period keeps a recently revoked token on disk, so presenting it again still reads as reuse rather than as an unknown token. Unreadable files are skipped.
func (*FSRefreshTokenStore) CreateRefreshToken ¶
func (s *FSRefreshTokenStore) CreateRefreshToken(ctx context.Context, req *core.CreateRefreshTokenRequest) (*core.CreateRefreshTokenResponse, error)
CreateRefreshToken mints a token that starts a new family at generation 1 and expires after core.TokenExpiryRefreshToken. The returned record carries the raw token. The file stores it too, under a name derived from its hash.
func (*FSRefreshTokenStore) GetRefreshToken ¶
func (s *FSRefreshTokenStore) GetRefreshToken(ctx context.Context, req *core.GetRefreshTokenRequest) (*core.GetRefreshTokenResponse, error)
GetRefreshToken returns the record for req.Token, revoked or expired ones included, so callers can tell reuse from an unknown token. A missing token is core.ErrTokenNotFound.
func (*FSRefreshTokenStore) GetSubjectTokens ¶ added in v0.1.3
func (s *FSRefreshTokenStore) GetSubjectTokens(ctx context.Context, req *core.GetSubjectTokensRequest) (*core.GetSubjectTokensResponse, error)
GetSubjectTokens lists req.Subject's tokens that are neither revoked nor expired. Each result has Token cleared, so a session listing can't leak a usable refresh token.
func (*FSRefreshTokenStore) RecordAccessToken ¶ added in v0.2.6
func (s *FSRefreshTokenStore) RecordAccessToken(ctx context.Context, req *core.RecordAccessTokenRequest) (*core.RecordAccessTokenResponse, error)
RecordAccessToken appends the access token to req.Token's record under the store lock, so it is atomic against RevokeTokenFamily. A missing token is core.ErrTokenNotFound.
func (*FSRefreshTokenStore) RevokeRefreshToken ¶
func (s *FSRefreshTokenStore) RevokeRefreshToken(ctx context.Context, req *core.RevokeRefreshTokenRequest) (*core.RevokeRefreshTokenResponse, error)
RevokeRefreshToken marks one token revoked. It is idempotent: a token that is missing or already revoked is not an error. Its family and recorded access tokens are left alone; RevokeTokenFamily covers those.
func (*FSRefreshTokenStore) RevokeSubjectTokens ¶ added in v0.1.3
func (s *FSRefreshTokenStore) RevokeSubjectTokens(ctx context.Context, req *core.RevokeSubjectTokensRequest) (*core.RevokeSubjectTokensResponse, error)
RevokeSubjectTokens revokes every live token of req.Subject and returns the unexpired access tokens recorded on any of them, revoked or not. It holds the store lock throughout, so it is atomic against RecordAccessToken.
func (*FSRefreshTokenStore) RevokeTokenFamily ¶
func (s *FSRefreshTokenStore) RevokeTokenFamily(ctx context.Context, req *core.RevokeTokenFamilyRequest) (*core.RevokeTokenFamilyResponse, error)
RevokeTokenFamily revokes every live token in the family and returns the unexpired access tokens recorded on any of them, revoked or not.
func (*FSRefreshTokenStore) RotateRefreshToken ¶
func (s *FSRefreshTokenStore) RotateRefreshToken(ctx context.Context, req *core.RotateRefreshTokenRequest) (*core.RotateRefreshTokenResponse, error)
RotateRefreshToken revokes req.OldToken and mints its successor in the same family at the next generation, under the store lock. The successor keeps the family's expiry, scopes, binding, OIDC grant and resources. A missing token is core.ErrTokenNotFound, an already-revoked one is core.ErrTokenReused (the caller revokes the family), and an expired one is core.ErrTokenExpired.
type FSTokenStore ¶
type FSTokenStore struct {
StoragePath string
}
FSTokenStore stores localauth verification and reset tokens as JSON files. Satisfies localauth.VerificationTokenStore.
func NewFSTokenStore ¶
func NewFSTokenStore(storagePath string) *FSTokenStore
func (*FSTokenStore) CreateToken ¶
func (s *FSTokenStore) CreateToken(ctx context.Context, req *localauth.CreateVerificationTokenRequest) (*localauth.CreateVerificationTokenResponse, error)
func (*FSTokenStore) DeleteSubjectTokens ¶ added in v0.1.3
func (s *FSTokenStore) DeleteSubjectTokens(ctx context.Context, req *localauth.DeleteSubjectVerificationTokensRequest) (*localauth.DeleteSubjectVerificationTokensResponse, error)
func (*FSTokenStore) DeleteToken ¶
func (s *FSTokenStore) DeleteToken(ctx context.Context, req *localauth.DeleteVerificationTokenRequest) (*localauth.DeleteVerificationTokenResponse, error)
func (*FSTokenStore) GetToken ¶
func (s *FSTokenStore) GetToken(ctx context.Context, req *localauth.GetVerificationTokenRequest) (*localauth.GetVerificationTokenResponse, error)
type FSUser ¶
type FSUser struct {
UserId string `json:"user_id"`
IsActive bool `json:"is_active"`
UserProfile map[string]any `json:"profile"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
FSUser implements the accounts.User interface
func (*FSUser) LastUpdated ¶ added in v0.3.8
LastUpdated reports when the user record last changed, which localauth.ProfileClaims returns as OIDC's updated_at claim. It implements accounts.LastUpdatedUser.
type FSUserStore ¶
type FSUserStore struct {
StoragePath string
}
FSUserStore stores users as JSON files
func NewFSUserStore ¶
func NewFSUserStore(storagePath string) *FSUserStore
func (*FSUserStore) CreateUser ¶
func (s *FSUserStore) CreateUser(ctx context.Context, req *accounts.CreateUserRequest) (*accounts.CreateUserResponse, error)
func (*FSUserStore) GetUserById ¶
func (s *FSUserStore) GetUserById(ctx context.Context, req *accounts.GetUserByIDRequest) (*accounts.GetUserByIDResponse, error)
func (*FSUserStore) SaveUser ¶
func (s *FSUserStore) SaveUser(ctx context.Context, req *accounts.SaveUserRequest) (*accounts.SaveUserResponse, error)
type FSUserTokenStore ¶ added in v0.3.5
type FSUserTokenStore struct {
StoragePath string
// contains filtered or unexported fields
}
FSUserTokenStore keeps outbound.UserTokenRecords as one JSON file each under <StoragePath>/user_tokens. The sealed bytes are written as given, so the files hold ciphertext only.
The compare-and-swap in PutUserToken holds within one process: a mutex covers the read, the version check and the atomic rename. Two processes sharing the directory can both pass the check, so replicas that refresh tokens need a GORM or GAE store.
func NewFSUserTokenStore ¶ added in v0.3.5
func NewFSUserTokenStore(storagePath string) *FSUserTokenStore
NewFSUserTokenStore returns a store rooted at storagePath. The directory is created on first write.
func (*FSUserTokenStore) DeleteUserToken ¶ added in v0.3.5
func (s *FSUserTokenStore) DeleteUserToken(_ context.Context, req *outbound.DeleteUserTokenRequest) (*outbound.DeleteUserTokenResponse, error)
DeleteUserToken removes the file. A missing file is not an error.
func (*FSUserTokenStore) GetUserToken ¶ added in v0.3.5
func (s *FSUserTokenStore) GetUserToken(_ context.Context, req *outbound.GetUserTokenRequest) (*outbound.GetUserTokenResponse, error)
GetUserToken returns the record, outbound.ErrUserTokenNotFound when no file exists, or ErrKeyCollision when the file names another key.
func (*FSUserTokenStore) PutUserToken ¶ added in v0.3.5
func (s *FSUserTokenStore) PutUserToken(_ context.Context, req *outbound.PutUserTokenRequest) (*outbound.PutUserTokenResponse, error)
PutUserToken writes if the stored version equals ExpectedVersion (zero meaning no file exists) and answers outbound.ErrVersionConflict otherwise. The file is replaced by rename, so a reader sees the old or the new record, never a mix.
type FSUsername ¶ added in v0.0.26
type FSUsername struct {
NormalizedUsername string `json:"normalized_username"`
Username string `json:"username"`
UserID string `json:"user_id"`
Version int `json:"version"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
FSUsername represents a username reservation stored as JSON
type FSUsernameStore ¶ added in v0.0.26
type FSUsernameStore struct {
StoragePath string
}
FSUsernameStore implements accounts.UsernameStore using filesystem storage.
func NewFSUsernameStore ¶ added in v0.0.26
func NewFSUsernameStore(storagePath string) *FSUsernameStore
func (*FSUsernameStore) ChangeUsername ¶ added in v0.0.26
func (s *FSUsernameStore) ChangeUsername(ctx context.Context, req *accounts.ChangeUsernameRequest) (*accounts.ChangeUsernameResponse, error)
func (*FSUsernameStore) GetUserByUsername ¶ added in v0.0.26
func (s *FSUsernameStore) GetUserByUsername(ctx context.Context, req *accounts.GetUserByUsernameRequest) (*accounts.GetUserByUsernameResponse, error)
func (*FSUsernameStore) ReleaseUsername ¶ added in v0.0.26
func (s *FSUsernameStore) ReleaseUsername(ctx context.Context, req *accounts.ReleaseUsernameRequest) (*accounts.ReleaseUsernameResponse, error)
func (*FSUsernameStore) ReserveUsername ¶ added in v0.0.26
func (s *FSUsernameStore) ReserveUsername(ctx context.Context, req *accounts.ReserveUsernameRequest) (*accounts.ReserveUsernameResponse, error)