Documentation
¶
Index ¶
- type DeviceAuthPair
- type IssuerPublicKeys
- type MemoryStore
- func (s *MemoryStore) AccessTokenStorage() oauth2.AccessTokenStorage
- func (s *MemoryStore) Authenticate(_ context.Context, name string, secret string) (subject string, err error)
- func (s *MemoryStore) AuthorizeCodeStorage() oauth2.AuthorizeCodeStorage
- func (s *MemoryStore) ClientAssertionJWTValid(_ context.Context, jti string) error
- func (s *MemoryStore) CreateAccessTokenSession(_ context.Context, signature string, req fosite.Requester) error
- func (s *MemoryStore) CreateAuthorizeCodeSession(_ context.Context, signature string, req fosite.Requester) error
- func (s *MemoryStore) CreateDeviceAuthSession(_ context.Context, deviceCodeSignature, userCodeSignature string, ...) error
- func (s *MemoryStore) CreateOpenIDConnectSession(_ context.Context, authorizeCode string, requester fosite.Requester) error
- func (s *MemoryStore) CreatePARSession(ctx context.Context, requestURI string, request fosite.AuthorizeRequester) error
- func (s *MemoryStore) CreatePKCERequestSession(_ context.Context, signature string, req fosite.Requester) error
- func (s *MemoryStore) CreateRefreshTokenSession(_ context.Context, signature, accessTokenSignature string, ...) error
- func (s *MemoryStore) DeleteAccessTokenSession(_ context.Context, signature string) error
- func (s *MemoryStore) DeleteOpenIDConnectSession(_ context.Context, authorizeCode string) error
- func (s *MemoryStore) DeletePARSession(ctx context.Context, requestURI string) (err error)
- func (s *MemoryStore) DeletePKCERequestSession(_ context.Context, _, signature string) error
- func (s *MemoryStore) DeleteRefreshTokenSession(_ context.Context, signature string) error
- func (s *MemoryStore) DeviceAuthStorage() rfc8628.DeviceAuthStorage
- func (s *MemoryStore) FositeClientManager() fosite.ClientManager
- func (s *MemoryStore) GetAccessTokenSession(_ context.Context, signature string, _ fosite.Session) (fosite.Requester, error)
- func (s *MemoryStore) GetAuthorizeCodeSession(_ context.Context, _, signature string, _ fosite.Session) (fosite.Requester, error)
- func (s *MemoryStore) GetClient(_ context.Context, id string) (fosite.Client, error)
- func (s *MemoryStore) GetDeviceCodeSession(_ context.Context, signature string, _ fosite.Session) (fosite.DeviceRequester, error)
- func (s *MemoryStore) GetOpenIDConnectSession(_ context.Context, authorizeCode string, requester fosite.Requester) (fosite.Requester, error)
- func (s *MemoryStore) GetPARSession(ctx context.Context, requestURI string) (fosite.AuthorizeRequester, error)
- func (s *MemoryStore) GetPKCERequestSession(_ context.Context, _, signature string, _ fosite.Session) (fosite.Requester, error)
- func (s *MemoryStore) GetPublicKey(ctx context.Context, issuer string, subject string, keyId string) (*jose.JSONWebKey, error)
- func (s *MemoryStore) GetPublicKeyScopes(ctx context.Context, issuer string, subject string, keyId string) ([]string, error)
- func (s *MemoryStore) GetPublicKeys(ctx context.Context, issuer string, subject string) (*jose.JSONWebKeySet, error)
- func (s *MemoryStore) GetRefreshTokenSession(_ context.Context, signature string, _ fosite.Session) (fosite.Requester, error)
- func (s *MemoryStore) InvalidateAuthorizeCodeSession(_ context.Context, _, signature string) error
- func (s *MemoryStore) InvalidateDeviceCodeSession(_ context.Context, code string) error
- func (s *MemoryStore) IsJWTUsed(ctx context.Context, jti string) (bool, error)
- func (s *MemoryStore) MarkJWTUsedForTime(ctx context.Context, jti string, exp time.Time) error
- func (s *MemoryStore) OpenIDConnectRequestStorage() openid.OpenIDConnectRequestStorage
- func (s *MemoryStore) PARStorage() fosite.PARStorage
- func (s *MemoryStore) PKCERequestStorage() pkce.PKCERequestStorage
- func (s *MemoryStore) RFC7523KeyStorage() rfc7523.RFC7523KeyStorage
- func (s *MemoryStore) RefreshTokenStorage() oauth2.RefreshTokenStorage
- func (s *MemoryStore) ResourceOwnerPasswordCredentialsGrantStorage() oauth2.ResourceOwnerPasswordCredentialsGrantStorage
- func (s *MemoryStore) RevokeAccessToken(ctx context.Context, requestID string) error
- func (s *MemoryStore) RevokeRefreshToken(ctx context.Context, requestID string) error
- func (s *MemoryStore) RotateRefreshToken(ctx context.Context, requestID string, refreshTokenSignature string) (err error)
- func (s *MemoryStore) SetClientAssertionJWT(_ context.Context, jti string, exp time.Time) error
- func (s *MemoryStore) SetTokenLifespans(clientID string, lifespans *fosite.ClientLifespanConfig) error
- func (s *MemoryStore) TokenRevocationStorage() oauth2.TokenRevocationStorage
- func (s *MemoryStore) Transaction(ctx context.Context, f func(ctx context.Context) error) error
- type MemoryUserRelation
- type PublicKeyScopes
- type StoreAuthorizeCode
- type StoreRefreshToken
- type SubjectPublicKeys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceAuthPair ¶
type DeviceAuthPair struct {
// contains filtered or unexported fields
}
type IssuerPublicKeys ¶
type IssuerPublicKeys struct {
Issuer string
KeysBySub map[string]SubjectPublicKeys
}
type MemoryStore ¶
type MemoryStore struct {
Clients map[string]fosite.Client
AuthorizeCodes map[string]StoreAuthorizeCode
IDSessions map[string]fosite.Requester
AccessTokens map[string]fosite.Requester
RefreshTokens map[string]StoreRefreshToken
DeviceAuths map[string]fosite.DeviceRequester
PKCES map[string]fosite.Requester
Users map[string]MemoryUserRelation
BlacklistedJTIs map[string]time.Time
// In-memory request ID to token signatures
AccessTokenRequestIDs map[string]string
RefreshTokenRequestIDs map[string]string
DeviceCodesRequestIDs map[string]DeviceAuthPair
UserCodesRequestIDs map[string]string
// Public keys to check signature in auth grant jwt assertion.
IssuerPublicKeys map[string]IssuerPublicKeys
PARSessions map[string]fosite.AuthorizeRequester
// contains filtered or unexported fields
}
func NewExampleStore ¶
func NewExampleStore() *MemoryStore
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
func (*MemoryStore) AccessTokenStorage ¶
func (s *MemoryStore) AccessTokenStorage() oauth2.AccessTokenStorage
func (*MemoryStore) Authenticate ¶
func (*MemoryStore) AuthorizeCodeStorage ¶
func (s *MemoryStore) AuthorizeCodeStorage() oauth2.AuthorizeCodeStorage
func (*MemoryStore) ClientAssertionJWTValid ¶
func (s *MemoryStore) ClientAssertionJWTValid(_ context.Context, jti string) error
func (*MemoryStore) CreateAccessTokenSession ¶
func (*MemoryStore) CreateAuthorizeCodeSession ¶
func (*MemoryStore) CreateDeviceAuthSession ¶
func (s *MemoryStore) CreateDeviceAuthSession(_ context.Context, deviceCodeSignature, userCodeSignature string, req fosite.DeviceRequester) error
CreateDeviceAuthSession stores the device auth session
func (*MemoryStore) CreateOpenIDConnectSession ¶
func (*MemoryStore) CreatePARSession ¶
func (s *MemoryStore) CreatePARSession(ctx context.Context, requestURI string, request fosite.AuthorizeRequester) error
CreatePARSession stores the pushed authorization request context. The requestURI is used to derive the key.
func (*MemoryStore) CreatePKCERequestSession ¶
func (*MemoryStore) CreateRefreshTokenSession ¶
func (*MemoryStore) DeleteAccessTokenSession ¶
func (s *MemoryStore) DeleteAccessTokenSession(_ context.Context, signature string) error
func (*MemoryStore) DeleteOpenIDConnectSession ¶
func (s *MemoryStore) DeleteOpenIDConnectSession(_ context.Context, authorizeCode string) error
func (*MemoryStore) DeletePARSession ¶
func (s *MemoryStore) DeletePARSession(ctx context.Context, requestURI string) (err error)
DeletePARSession deletes the context.
func (*MemoryStore) DeletePKCERequestSession ¶
func (s *MemoryStore) DeletePKCERequestSession(_ context.Context, _, signature string) error
DeletePKCERequestSession keys by signature; code is accepted for interface compatibility with AEAD storage adapters and intentionally unused here.
func (*MemoryStore) DeleteRefreshTokenSession ¶
func (s *MemoryStore) DeleteRefreshTokenSession(_ context.Context, signature string) error
func (*MemoryStore) DeviceAuthStorage ¶
func (s *MemoryStore) DeviceAuthStorage() rfc8628.DeviceAuthStorage
func (*MemoryStore) FositeClientManager ¶
func (s *MemoryStore) FositeClientManager() fosite.ClientManager
func (*MemoryStore) GetAccessTokenSession ¶
func (*MemoryStore) GetAuthorizeCodeSession ¶
func (s *MemoryStore) GetAuthorizeCodeSession(_ context.Context, _, signature string, _ fosite.Session) (fosite.Requester, error)
GetAuthorizeCodeSession keys by signature; code is accepted for interface compatibility with AEAD storage adapters and intentionally unused here.
func (*MemoryStore) GetDeviceCodeSession ¶
func (s *MemoryStore) GetDeviceCodeSession(_ context.Context, signature string, _ fosite.Session) (fosite.DeviceRequester, error)
GetDeviceCodeSession gets the device code session
func (*MemoryStore) GetOpenIDConnectSession ¶
func (*MemoryStore) GetPARSession ¶
func (s *MemoryStore) GetPARSession(ctx context.Context, requestURI string) (fosite.AuthorizeRequester, error)
GetPARSession gets the push authorization request context. If the request is nil, a new request object is created. Otherwise, the same object is updated.
func (*MemoryStore) GetPKCERequestSession ¶
func (s *MemoryStore) GetPKCERequestSession(_ context.Context, _, signature string, _ fosite.Session) (fosite.Requester, error)
GetPKCERequestSession keys by signature; code is accepted for interface compatibility with AEAD storage adapters and intentionally unused here.
func (*MemoryStore) GetPublicKey ¶
func (s *MemoryStore) GetPublicKey(ctx context.Context, issuer string, subject string, keyId string) (*jose.JSONWebKey, error)
func (*MemoryStore) GetPublicKeyScopes ¶
func (*MemoryStore) GetPublicKeys ¶
func (s *MemoryStore) GetPublicKeys(ctx context.Context, issuer string, subject string) (*jose.JSONWebKeySet, error)
func (*MemoryStore) GetRefreshTokenSession ¶
func (*MemoryStore) InvalidateAuthorizeCodeSession ¶
func (s *MemoryStore) InvalidateAuthorizeCodeSession(_ context.Context, _, signature string) error
InvalidateAuthorizeCodeSession keys by signature; code is accepted for interface compatibility with AEAD storage adapters and intentionally unused here.
func (*MemoryStore) InvalidateDeviceCodeSession ¶
func (s *MemoryStore) InvalidateDeviceCodeSession(_ context.Context, code string) error
InvalidateDeviceCodeSession invalidates the device code session
func (*MemoryStore) MarkJWTUsedForTime ¶
func (*MemoryStore) OpenIDConnectRequestStorage ¶
func (s *MemoryStore) OpenIDConnectRequestStorage() openid.OpenIDConnectRequestStorage
func (*MemoryStore) PARStorage ¶
func (s *MemoryStore) PARStorage() fosite.PARStorage
func (*MemoryStore) PKCERequestStorage ¶
func (s *MemoryStore) PKCERequestStorage() pkce.PKCERequestStorage
func (*MemoryStore) RFC7523KeyStorage ¶
func (s *MemoryStore) RFC7523KeyStorage() rfc7523.RFC7523KeyStorage
func (*MemoryStore) RefreshTokenStorage ¶
func (s *MemoryStore) RefreshTokenStorage() oauth2.RefreshTokenStorage
func (*MemoryStore) ResourceOwnerPasswordCredentialsGrantStorage ¶
func (s *MemoryStore) ResourceOwnerPasswordCredentialsGrantStorage() oauth2.ResourceOwnerPasswordCredentialsGrantStorage
func (*MemoryStore) RevokeAccessToken ¶
func (s *MemoryStore) RevokeAccessToken(ctx context.Context, requestID string) error
func (*MemoryStore) RevokeRefreshToken ¶
func (s *MemoryStore) RevokeRefreshToken(ctx context.Context, requestID string) error
func (*MemoryStore) RotateRefreshToken ¶
func (*MemoryStore) SetClientAssertionJWT ¶
func (*MemoryStore) SetTokenLifespans ¶
func (s *MemoryStore) SetTokenLifespans(clientID string, lifespans *fosite.ClientLifespanConfig) error
func (*MemoryStore) TokenRevocationStorage ¶
func (s *MemoryStore) TokenRevocationStorage() oauth2.TokenRevocationStorage
func (*MemoryStore) Transaction ¶
Transaction runs f but cannot provide any transactional guarantees in memory, so it is a no-op.
type MemoryUserRelation ¶
type PublicKeyScopes ¶
type PublicKeyScopes struct {
Key *jose.JSONWebKey
Scopes []string
}
type StoreAuthorizeCode ¶
type StoreRefreshToken ¶
type SubjectPublicKeys ¶
type SubjectPublicKeys struct {
Subject string
Keys map[string]PublicKeyScopes
}