impl

package
v0.0.0-...-92c98fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	// contains filtered or unexported fields
}

type AuthRequest

type AuthRequest struct {
	// contains filtered or unexported fields
}

func (*AuthRequest) Done

func (a *AuthRequest) Done() bool

func (*AuthRequest) FinishWithSubject

func (a *AuthRequest) FinishWithSubject(id string)

func (*AuthRequest) GetACR

func (a *AuthRequest) GetACR() string

func (*AuthRequest) GetAMR

func (a *AuthRequest) GetAMR() []string

func (*AuthRequest) GetAudience

func (a *AuthRequest) GetAudience() []string

func (*AuthRequest) GetAuthTime

func (a *AuthRequest) GetAuthTime() time.Time

func (*AuthRequest) GetClientID

func (a *AuthRequest) GetClientID() string

func (*AuthRequest) GetCodeChallenge

func (a *AuthRequest) GetCodeChallenge() *oidc.CodeChallenge

func (*AuthRequest) GetID

func (a *AuthRequest) GetID() string

func (*AuthRequest) GetNonce

func (a *AuthRequest) GetNonce() string

func (*AuthRequest) GetRedirectURI

func (a *AuthRequest) GetRedirectURI() string

func (*AuthRequest) GetResponseMode

func (a *AuthRequest) GetResponseMode() oidc.ResponseMode

func (*AuthRequest) GetResponseType

func (a *AuthRequest) GetResponseType() oidc.ResponseType

func (*AuthRequest) GetScopes

func (a *AuthRequest) GetScopes() []string

func (*AuthRequest) GetState

func (a *AuthRequest) GetState() string

func (*AuthRequest) GetSubject

func (a *AuthRequest) GetSubject() string

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) AccessTokenType

func (c *Client) AccessTokenType() op.AccessTokenType

func (*Client) ApplicationType

func (c *Client) ApplicationType() op.ApplicationType

func (*Client) AuthMethod

func (c *Client) AuthMethod() oidc.AuthMethod

func (*Client) ClockSkew

func (c *Client) ClockSkew() time.Duration

func (*Client) DevMode

func (c *Client) DevMode() bool

func (*Client) GetID

func (c *Client) GetID() string

func (*Client) GrantTypes

func (c *Client) GrantTypes() []oidc.GrantType

func (*Client) IDTokenLifetime

func (c *Client) IDTokenLifetime() time.Duration

func (*Client) IDTokenUserinfoClaimsAssertion

func (c *Client) IDTokenUserinfoClaimsAssertion() bool

func (*Client) IsScopeAllowed

func (c *Client) IsScopeAllowed(scope string) bool

func (*Client) LoginURL

func (c *Client) LoginURL(id string) string

func (*Client) PostLogoutRedirectURIs

func (c *Client) PostLogoutRedirectURIs() []string

func (*Client) RedirectURIs

func (c *Client) RedirectURIs() []string

func (*Client) ResponseTypes

func (c *Client) ResponseTypes() []oidc.ResponseType

func (*Client) RestrictAdditionalAccessTokenScopes

func (c *Client) RestrictAdditionalAccessTokenScopes() func(scopes []string) []string

func (*Client) RestrictAdditionalIdTokenScopes

func (c *Client) RestrictAdditionalIdTokenScopes() func(scopes []string) []string

type Key

type Key struct {
	SigningKey
}

func (*Key) Algorithm

func (k *Key) Algorithm() jose.SignatureAlgorithm

func (*Key) ID

func (k *Key) ID() string

func (*Key) Key

func (k *Key) Key() any

func (*Key) Use

func (k *Key) Use() string

type RefreshToken

type RefreshToken struct {
	// contains filtered or unexported fields
}

func (*RefreshToken) GetAMR

func (r *RefreshToken) GetAMR() []string

func (*RefreshToken) GetAudience

func (r *RefreshToken) GetAudience() []string

func (*RefreshToken) GetAuthTime

func (r *RefreshToken) GetAuthTime() time.Time

func (*RefreshToken) GetClientID

func (r *RefreshToken) GetClientID() string

func (*RefreshToken) GetScopes

func (r *RefreshToken) GetScopes() []string

func (*RefreshToken) GetSubject

func (r *RefreshToken) GetSubject() string

func (*RefreshToken) SetCurrentScopes

func (r *RefreshToken) SetCurrentScopes(scopes []string)

type SigningKey

type SigningKey struct {
	// contains filtered or unexported fields
}

func (*SigningKey) ID

func (s *SigningKey) ID() string

func (*SigningKey) Key

func (s *SigningKey) Key() any

func (*SigningKey) SignatureAlgorithm

func (s *SigningKey) SignatureAlgorithm() jose.SignatureAlgorithm

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func CreateStorage

func CreateStorage(cfg *config.Config) *Storage

func (*Storage) AuthRequestByCode

func (s *Storage) AuthRequestByCode(ctx context.Context, code string) (op.AuthRequest, error)

func (*Storage) AuthRequestByID

func (s *Storage) AuthRequestByID(ctx context.Context, id string) (op.AuthRequest, error)

func (*Storage) AuthorizeClientIDSecret

func (s *Storage) AuthorizeClientIDSecret(ctx context.Context, clientID, clientSecret string) error

func (*Storage) CreateAccessAndRefreshTokens

func (s *Storage) CreateAccessAndRefreshTokens(ctx context.Context, data op.TokenRequest, oldRefreshTokenId string) (newAccessTokenID string, newRefreshTokenID string, expiration time.Time, err error)

func (*Storage) CreateAccessToken

func (s *Storage) CreateAccessToken(ctx context.Context, data op.TokenRequest) (accessTokenID string, expiration time.Time, err error)

func (*Storage) CreateAuthRequest

func (s *Storage) CreateAuthRequest(ctx context.Context, req *oidc.AuthRequest, userID string) (op.AuthRequest, error)

func (*Storage) DeleteAuthRequest

func (s *Storage) DeleteAuthRequest(ctx context.Context, id string) error

func (*Storage) GetClientByClientID

func (s *Storage) GetClientByClientID(ctx context.Context, clientID string) (op.Client, error)

func (*Storage) GetKeyByIDAndClientID

func (s *Storage) GetKeyByIDAndClientID(ctx context.Context, keyID, clientID string) (*jose.JSONWebKey, error)

func (*Storage) GetPrivateClaimsFromScopes

func (s *Storage) GetPrivateClaimsFromScopes(ctx context.Context, userID, clientID string, scopes []string) (map[string]any, error)

func (*Storage) GetRefreshTokenInfo

func (s *Storage) GetRefreshTokenInfo(ctx context.Context, clientID string, token string) (userID string, tokenID string, err error)

func (*Storage) Health

func (s *Storage) Health(context.Context) error

func (*Storage) KeySet

func (s *Storage) KeySet(context.Context) ([]op.Key, error)

func (*Storage) LocalRequestByID

func (s *Storage) LocalRequestByID(id string) (*AuthRequest, error)

func (*Storage) RevokeToken

func (s *Storage) RevokeToken(ctx context.Context, tokenOrTokenID string, userID string, clientID string) *oidc.Error

func (*Storage) SaveAuthCode

func (s *Storage) SaveAuthCode(ctx context.Context, id string, code string) error

func (*Storage) SetIntrospectionFromToken

func (s *Storage) SetIntrospectionFromToken(ctx context.Context, introspection *oidc.IntrospectionResponse, tokenID, subject, clientID string) error

func (*Storage) SetUserinfoFromRequest

func (s *Storage) SetUserinfoFromRequest(ctx context.Context, userinfo *oidc.UserInfo, request op.IDTokenRequest, scopes []string) error

func (*Storage) SetUserinfoFromScopes

func (s *Storage) SetUserinfoFromScopes(ctx context.Context, userinfo *oidc.UserInfo, userID, clientID string, scopes []string) error

Depreciated

func (*Storage) SetUserinfoFromToken

func (s *Storage) SetUserinfoFromToken(ctx context.Context, userinfo *oidc.UserInfo, tokenID, subject, origin string) error

func (*Storage) SignatureAlgorithms

func (s *Storage) SignatureAlgorithms(context.Context) ([]jose.SignatureAlgorithm, error)

func (*Storage) SigningKey

func (s *Storage) SigningKey(context.Context) (op.SigningKey, error)

func (*Storage) TerminateSession

func (s *Storage) TerminateSession(ctx context.Context, userID string, clientID string) error

func (*Storage) TokenRequestByRefreshToken

func (s *Storage) TokenRequestByRefreshToken(ctx context.Context, refreshTokenID string) (op.RefreshTokenRequest, error)

func (*Storage) ValidateJWTProfileScopes

func (s *Storage) ValidateJWTProfileScopes(ctx context.Context, userID string, scopes []string) ([]string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL