Versions in this module Expand all Collapse all v0 v0.77.0 Dec 5, 2026 Changes in this version + type MigrationResult struct + IdentitiesFailed int + IdentitiesMigrated int + IdentitiesSkipped int + TokensFailed int + TokensMigrated int + TokensSkipped int + type RedisStorage struct + func NewRedisStorage(ctx context.Context, cfg redisconn.Config, keyPrefix string, ...) (*RedisStorage, error) + func NewRedisStorageWithClient(client redis.UniversalClient, keyPrefix string, opts ...RedisStorageOption) *RedisStorage + func (s *RedisStorage) BackfillDCRClientIndex(ctx context.Context) error + func (s *RedisStorage) ClientAssertionJWTValid(ctx context.Context, jti string) error + func (s *RedisStorage) Close() error + func (s *RedisStorage) CompareAndSwapProviderIdentity(ctx context.Context, expected, replacement *storage.ProviderIdentity) error + func (s *RedisStorage) CompareAndSwapUpstreamTokens(ctx context.Context, sessionID, providerName, expectedRefreshToken string, ...) error + func (s *RedisStorage) ConsumeAssertionJWT(ctx context.Context, purpose, issuer, jti string, exp time.Time) error + func (s *RedisStorage) CountDCRClients(ctx context.Context) (int64, error) + func (s *RedisStorage) CreateAccessTokenSession(ctx context.Context, signature string, request fosite.Requester) error + func (s *RedisStorage) CreateAuthorizeCodeSession(ctx context.Context, code string, request fosite.Requester) error + func (s *RedisStorage) CreateExchangeGrant(ctx context.Context, g *storage.ExchangeGrant) error + func (s *RedisStorage) CreatePKCERequestSession(ctx context.Context, signature string, request fosite.Requester) error + func (s *RedisStorage) CreateProviderIdentity(ctx context.Context, identity *storage.ProviderIdentity) error + func (s *RedisStorage) CreateRefreshTokenSession(ctx context.Context, signature string, _ string, request fosite.Requester) error + func (s *RedisStorage) CreateUser(ctx context.Context, user *storage.User) error + func (s *RedisStorage) DeleteAccessTokenSession(ctx context.Context, signature string) error + func (s *RedisStorage) DeleteConsentSession(ctx context.Context, digest string) error + func (s *RedisStorage) DeleteDeviceRequest(ctx context.Context, deviceCode string) error + func (s *RedisStorage) DeletePKCERequestSession(ctx context.Context, signature string) error + func (s *RedisStorage) DeletePendingAuthorization(ctx context.Context, state string) error + func (s *RedisStorage) DeletePendingDeviceConfirmation(ctx context.Context, token string) error + func (s *RedisStorage) DeletePendingDeviceLogin(ctx context.Context, state string) error + func (s *RedisStorage) DeleteRefreshTokenSession(ctx context.Context, signature string) error + func (s *RedisStorage) DeleteUpstreamTokens(ctx context.Context, sessionID string) error + func (s *RedisStorage) DeleteUpstreamTokensForProvider(ctx context.Context, sessionID, providerName string) error + func (s *RedisStorage) DeleteUser(ctx context.Context, id string) error + func (s *RedisStorage) GetAccessTokenSession(ctx context.Context, signature string, _ fosite.Session) (fosite.Requester, error) + func (s *RedisStorage) GetAllUpstreamTokens(ctx context.Context, sessionID string) (map[string]*storage.UpstreamTokens, error) + func (s *RedisStorage) GetAuthorizeCodeSession(ctx context.Context, code string, _ fosite.Session) (fosite.Requester, error) + func (s *RedisStorage) GetClient(ctx context.Context, id string) (fosite.Client, error) + func (s *RedisStorage) GetClientApproval(ctx context.Context, userID, clientID string) (*storage.ClientApproval, error) + func (s *RedisStorage) GetConsentSession(ctx context.Context, digest string) (*storage.ConsentSession, error) + func (s *RedisStorage) GetDCRCredentials(ctx context.Context, key dcrkey.Key) (*storage.DCRCredentials, error) + func (s *RedisStorage) GetExchangeGrant(ctx context.Context, signature string) (*storage.ExchangeGrant, error) + func (s *RedisStorage) GetLatestUpstreamTokensForUser(ctx context.Context, userID string, providerID string) (*storage.UpstreamTokens, error) + func (s *RedisStorage) GetPKCERequestSession(ctx context.Context, signature string, _ fosite.Session) (fosite.Requester, error) + func (s *RedisStorage) GetProviderIdentity(ctx context.Context, providerID string, providerSubject string) (*storage.ProviderIdentity, error) + func (s *RedisStorage) GetRefreshTokenSession(ctx context.Context, signature string, _ fosite.Session) (fosite.Requester, error) + func (s *RedisStorage) GetUpstreamTokens(ctx context.Context, sessionID, providerName string) (*storage.UpstreamTokens, error) + func (s *RedisStorage) GetUser(ctx context.Context, id string) (*storage.User, error) + func (s *RedisStorage) GetUserProviderIdentities(ctx context.Context, userID string) ([]*storage.ProviderIdentity, error) + func (s *RedisStorage) Health(ctx context.Context) error + func (s *RedisStorage) InvalidateAuthorizeCodeSession(ctx context.Context, code string) error + func (s *RedisStorage) LoadDeviceRequestByDeviceCode(ctx context.Context, deviceCode string) (*storage.DeviceRequest, error) + func (s *RedisStorage) LoadDeviceRequestByUserCode(ctx context.Context, userCode string) (*storage.DeviceRequest, error) + func (s *RedisStorage) LoadPendingAuthorization(ctx context.Context, state string) (*storage.PendingAuthorization, error) + func (s *RedisStorage) LoadPendingDeviceConfirmation(ctx context.Context, token string) (*storage.PendingDeviceConfirmation, error) + func (s *RedisStorage) LoadPendingDeviceLogin(ctx context.Context, state string) (*storage.PendingDeviceLogin, error) + func (s *RedisStorage) MarkDeviceRequestAuthorized(ctx context.Context, deviceCode string, auth storage.DeviceAuthorization) error + func (s *RedisStorage) MarkDeviceRequestDenied(ctx context.Context, deviceCode string) error + func (s *RedisStorage) MigrateLegacyUpstreamData(ctx context.Context, providerName, legacyProviderID string) error + func (s *RedisStorage) ReconcileConfiguredClient(ctx context.Context, client fosite.Client) error + func (s *RedisStorage) RegisterClient(ctx context.Context, client fosite.Client) error + func (s *RedisStorage) RenewClientTTL(ctx context.Context, client fosite.Client) error + func (s *RedisStorage) ResolveUpstreamTokenRowID(_ context.Context, sessionID string, providerName string) (storage.UpstreamTokenRowID, error) + func (s *RedisStorage) RevokeAccessToken(ctx context.Context, requestID string) error + func (s *RedisStorage) RevokeExchangeGrant(ctx context.Context, signature string, now time.Time) error + func (s *RedisStorage) RevokeRefreshToken(ctx context.Context, requestID string) error + func (s *RedisStorage) RevokeRefreshTokenMaybeGracePeriod(ctx context.Context, requestID string, _ string) error + func (s *RedisStorage) RotateRefreshToken(ctx context.Context, requestID string, refreshTokenSignature string) error + func (s *RedisStorage) SetClientAssertionJWT(ctx context.Context, jti string, deadline time.Time) error + func (s *RedisStorage) StoreClientApproval(ctx context.Context, userID, clientID string, approval *storage.ClientApproval) error + func (s *RedisStorage) StoreConsentSession(ctx context.Context, digest string, session *storage.ConsentSession) error + func (s *RedisStorage) StoreDCRCredentialsIfAbsent(ctx context.Context, creds *storage.DCRCredentials) (*storage.DCRCredentials, error) + func (s *RedisStorage) StoreDeviceRequest(ctx context.Context, device *storage.DeviceRequest) error + func (s *RedisStorage) StorePendingAuthorization(ctx context.Context, state string, pending *storage.PendingAuthorization) error + func (s *RedisStorage) StorePendingDeviceConfirmation(ctx context.Context, token string, pending *storage.PendingDeviceConfirmation) error + func (s *RedisStorage) StorePendingDeviceLogin(ctx context.Context, state string, pending *storage.PendingDeviceLogin) error + func (s *RedisStorage) StoreUpstreamTokens(ctx context.Context, sessionID string, providerName string, ...) error + func (s *RedisStorage) UpdateDCRCredentialsIfPresent(ctx context.Context, creds *storage.DCRCredentials) (*storage.DCRCredentials, error) + func (s *RedisStorage) UpdateDCRCredentialsIfUnchanged(ctx context.Context, creds, expected *storage.DCRCredentials) (*storage.DCRCredentials, error) + func (s *RedisStorage) UpdateDeviceRequestLastPolledAt(ctx context.Context, deviceCode string, polledAt time.Time) error + func (s *RedisStorage) UpdateProviderIdentityLastUsed(ctx context.Context, providerID, providerSubject string, lastUsedAt time.Time) error + func (s *RedisStorage) UpsertDCRIssuedClient(ctx context.Context, client fosite.Client) error + type RedisStorageOption func(*RedisStorage) + func WithRedisMaxDCRClients(n int) RedisStorageOption