Documentation
¶
Overview ¶
Package defaultstore implements the SQL-backed default store for the jwt plugin.
Index ¶
- type DefaultJWTStore
- func (s *DefaultJWTStore) DeleteExpiredJWKS(ctx context.Context) error
- func (s *DefaultJWTStore) GetCurrentJWK(ctx context.Context, algorithm, use string) (jwk.Key, error)
- func (s *DefaultJWTStore) ListJWKS(ctx context.Context) ([]jwttypes.JWK, error)
- func (s *DefaultJWTStore) StoreJWK(ctx context.Context, key jwk.Key, algorithm, use string, expiresAt *time.Time) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultJWTStore ¶
type DefaultJWTStore struct {
// contains filtered or unexported fields
}
DefaultJWTStore implements jwttypes.Store using a SQL database backend.
Supports PostgreSQL, MySQL, and SQLite through dialect-specific sqlc-generated queries. Safe for concurrent use.
func NewDefaultJWTStore ¶
NewDefaultJWTStore creates a DefaultJWTStore for the given dialect. The dialect switch happens exactly once here; all store methods call through the querier interface and are dialect-agnostic.
func (*DefaultJWTStore) DeleteExpiredJWKS ¶
func (s *DefaultJWTStore) DeleteExpiredJWKS(ctx context.Context) error
DeleteExpiredJWKS removes all expired keys from the database.
func (*DefaultJWTStore) GetCurrentJWK ¶
func (s *DefaultJWTStore) GetCurrentJWK(ctx context.Context, algorithm, use string) (jwk.Key, error)
GetCurrentJWK retrieves the most recent non-expired JWK matching algorithm and use.
Click to show internal directories.
Click to hide internal directories.