Documentation ¶
Index ¶
- type LocalAuthStorage
- func (s LocalAuthStorage) AuthRequestByCode(_ context.Context, _ string) (op.AuthRequest, error)
- func (s LocalAuthStorage) AuthRequestByID(_ context.Context, _ string) (op.AuthRequest, error)
- func (s LocalAuthStorage) CreateAccessAndRefreshTokens(ctx context.Context, request op.TokenRequest, currentRefreshToken string) (accessTokenID string, newRefreshTokenID string, expiration time.Time, ...)
- func (s LocalAuthStorage) CreateAccessToken(_ context.Context, _ op.TokenRequest) (accessTokenID string, expiration time.Time, err error)
- func (s LocalAuthStorage) CreateAuthRequest(_ context.Context, _ *oidc.AuthRequest, _ string) (op.AuthRequest, error)
- func (s LocalAuthStorage) DeleteAuthRequest(_ context.Context, _ string) error
- func (s LocalAuthStorage) GetKeySet(ctx context.Context) (*jose.JSONWebKeySet, error)
- func (s LocalAuthStorage) GetSigningKey(ctx context.Context, signkey chan<- jose.SigningKey)
- func (s LocalAuthStorage) RevokeToken(ctx context.Context, tokenID string, userID string, clientID string) *oidc.Error
- func (s LocalAuthStorage) SaveAuthCode(_ context.Context, _ string, _ string) error
- func (s LocalAuthStorage) TerminateSession(ctx context.Context, userID string, clientID string) error
- func (s LocalAuthStorage) TokenRequestByRefreshToken(ctx context.Context, refreshTokenID string) (op.RefreshTokenRequest, error)
- type LocalOPStorage
- func (s LocalOPStorage) AuthorizeClientIDSecret(ctx context.Context, clientID string, clientSecret string) error
- func (s LocalOPStorage) GetClientByClientID(ctx context.Context, clientID string) (op.Client, error)
- func (s LocalOPStorage) GetKeyByIDAndUserID(ctx context.Context, keyID string, userID string) (*jose.JSONWebKey, error)
- func (s LocalOPStorage) GetPrivateClaimsFromScopes(ctx context.Context, userID string, clientID string, scopes []string) (map[string]interface{}, error)
- func (s LocalOPStorage) SetIntrospectionFromToken(ctx context.Context, userinfo oidc.IntrospectionResponse, tokenID string, ...) error
- func (s LocalOPStorage) SetUserinfoFromScopes(ctx context.Context, userinfo oidc.UserInfoSetter, userID string, ...) error
- func (s LocalOPStorage) SetUserinfoFromToken(ctx context.Context, userinfo oidc.UserInfoSetter, tokenID string, ...) error
- func (s LocalOPStorage) ValidateJWTProfileScopes(ctx context.Context, userID string, scopes []string) ([]string, error)
- type LocalStorage
- type OIDCOptions
- type OIDCProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalAuthStorage ¶
type LocalAuthStorage struct { Certs tls.Certificate // contains filtered or unexported fields }
func (LocalAuthStorage) AuthRequestByCode ¶
func (s LocalAuthStorage) AuthRequestByCode(_ context.Context, _ string) (op.AuthRequest, error)
func (LocalAuthStorage) AuthRequestByID ¶
func (s LocalAuthStorage) AuthRequestByID(_ context.Context, _ string) (op.AuthRequest, error)
func (LocalAuthStorage) CreateAccessAndRefreshTokens ¶
func (s LocalAuthStorage) CreateAccessAndRefreshTokens( ctx context.Context, request op.TokenRequest, currentRefreshToken string, ) (accessTokenID string, newRefreshTokenID string, expiration time.Time, err error)
The TokenRequest parameter of CreateAccessAndRefreshTokens can be any of:
* TokenRequest as returned by ClientCredentialsStorage.ClientCredentialsTokenRequest
* RefreshTokenRequest as returned by AuthStorage.TokenRequestByRefreshToken
- AuthRequest as by returned by the AuthRequestByID or AuthRequestByCode (above). Used for the authorization code flow which requested offline_access scope and registered the refresh_token grant type in advance
func (LocalAuthStorage) CreateAccessToken ¶
func (s LocalAuthStorage) CreateAccessToken(_ context.Context, _ op.TokenRequest) (accessTokenID string, expiration time.Time, err error)
The TokenRequest parameter of CreateAccessToken can be any of:
* TokenRequest as returned by ClientCredentialsStorage.ClientCredentialsTokenRequest,
* AuthRequest as returned by AuthRequestByID or AuthRequestByCode (above)
- *oidc.JWTTokenRequest from a JWT that is the assertion value of a JWT Profile Grant: https://datatracker.ietf.org/doc/html/rfc7523#section-2.1
func (LocalAuthStorage) CreateAuthRequest ¶
func (s LocalAuthStorage) CreateAuthRequest(_ context.Context, _ *oidc.AuthRequest, _ string) (op.AuthRequest, error)
func (LocalAuthStorage) DeleteAuthRequest ¶
func (s LocalAuthStorage) DeleteAuthRequest(_ context.Context, _ string) error
func (LocalAuthStorage) GetKeySet ¶
func (s LocalAuthStorage) GetKeySet(ctx context.Context) (*jose.JSONWebKeySet, error)
func (LocalAuthStorage) GetSigningKey ¶
func (s LocalAuthStorage) GetSigningKey(ctx context.Context, signkey chan<- jose.SigningKey)
func (LocalAuthStorage) RevokeToken ¶
func (LocalAuthStorage) SaveAuthCode ¶
func (LocalAuthStorage) TerminateSession ¶
func (LocalAuthStorage) TokenRequestByRefreshToken ¶
func (s LocalAuthStorage) TokenRequestByRefreshToken(ctx context.Context, refreshTokenID string) (op.RefreshTokenRequest, error)
type LocalOPStorage ¶
type LocalOPStorage struct{}
func (LocalOPStorage) AuthorizeClientIDSecret ¶
func (LocalOPStorage) GetClientByClientID ¶
func (LocalOPStorage) GetKeyByIDAndUserID ¶
func (LocalOPStorage) GetPrivateClaimsFromScopes ¶
func (LocalOPStorage) SetIntrospectionFromToken ¶
func (s LocalOPStorage) SetIntrospectionFromToken( ctx context.Context, userinfo oidc.IntrospectionResponse, tokenID string, subject string, clientID string, ) error
func (LocalOPStorage) SetUserinfoFromScopes ¶
func (s LocalOPStorage) SetUserinfoFromScopes(ctx context.Context, userinfo oidc.UserInfoSetter, userID string, clientID string, scopes []string) error
func (LocalOPStorage) SetUserinfoFromToken ¶
func (s LocalOPStorage) SetUserinfoFromToken(ctx context.Context, userinfo oidc.UserInfoSetter, tokenID string, subject string, origin string) error
func (LocalOPStorage) ValidateJWTProfileScopes ¶
type LocalStorage ¶
type LocalStorage struct { LocalOPStorage LocalAuthStorage }
func NewLocalStorage ¶
func NewLocalStorage(ctx context.Context, options *OIDCOptions) (*LocalStorage, error)
type OIDCOptions ¶
type OIDCProvider ¶
type OIDCProvider struct {
OP op.OpenIDProvider
}
func NewProvider ¶
func NewProvider(ctx context.Context, options *OIDCOptions) (*OIDCProvider, error)
func (*OIDCProvider) RegisterRoute ¶
func (m *OIDCProvider) RegisterRoute(rg *route.Group)
Click to show internal directories.
Click to hide internal directories.