Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWKSRepository ¶
type JWKSRepository interface {
// GetJWKSKeys retrieves all valid (non-expired) JWKS keys
GetJWKSKeys(ctx context.Context) ([]*types.JWKS, error)
// GetJWKSKeyByID retrieves a specific JWKS key by its ID
GetJWKSKeyByID(ctx context.Context, id string) (*types.JWKS, error)
// StoreJWKSKey saves a JWKS key
StoreJWKSKey(ctx context.Context, key *types.JWKS) error
// UpdateJWKSKey updates an existing JWKS key
UpdateJWKSKey(ctx context.Context, key *types.JWKS) error
// MarkKeyExpired marks a JWKS key as expired
MarkKeyExpired(ctx context.Context, id string, expiresAt time.Time) error
// PurgeExpiredKeys removes expired JWKS keys
PurgeExpiredKeys(ctx context.Context) error
}
JWKSRepository provides data access for JWKS (JSON Web Key Set) records
func NewBunJWKSRepository ¶
func NewBunJWKSRepository(db bun.IDB) JWKSRepository
NewBunJWKSRepository creates a new Bun-based JWKS repository
type RefreshTokenRepository ¶
type RefreshTokenRepository interface {
// StoreRefreshToken saves a refresh token record
StoreRefreshToken(ctx context.Context, record *types.RefreshToken) error
// GetRefreshToken retrieves a refresh token by hash
GetRefreshToken(ctx context.Context, tokenHash string) (*types.RefreshToken, error)
// RevokeRefreshToken marks a token as revoked
RevokeRefreshToken(ctx context.Context, tokenHash string) error
// RevokeAllSessionTokens revokes all refresh tokens for a session
RevokeAllSessionTokens(ctx context.Context, sessionID string) error
// SetLastReuseAttempt updates the last reuse attempt timestamp for a token
SetLastReuseAttempt(ctx context.Context, tokenHash string) error
// CleanupExpiredTokens removes expired refresh token records
CleanupExpiredTokens(ctx context.Context) error
}
RefreshTokenRepository provides data access for refresh token records
func NewRefreshTokenRepository ¶
func NewRefreshTokenRepository(db bun.IDB) RefreshTokenRepository
Click to show internal directories.
Click to hide internal directories.