mock

package
v0.0.0-...-5ee5877 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthStorage

func NewAuthStorage() op.Storage

Types

type AuthRequest

type AuthRequest struct {
	ID            string
	ResponseType  oidc.ResponseType
	ResponseMode  oidc.ResponseMode
	RedirectURI   string
	Nonce         string
	ClientID      string
	CodeChallenge *oidc.CodeChallenge
	State         string
}

func (*AuthRequest) Done

func (a *AuthRequest) Done() bool

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) GetCode

func (a *AuthRequest) GetCode() 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

func (*AuthRequest) SetCurrentScopes

func (a *AuthRequest) SetCurrentScopes(scopes []string)

type AuthStorage

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

func (*AuthStorage) AuthRequestByCode

func (s *AuthStorage) AuthRequestByCode(_ context.Context, code string) (op.AuthRequest, error)

func (*AuthStorage) AuthRequestByID

func (s *AuthStorage) AuthRequestByID(_ context.Context, id string) (op.AuthRequest, error)

func (*AuthStorage) AuthorizeClientIDSecret

func (s *AuthStorage) AuthorizeClientIDSecret(_ context.Context, id string, _ string) error

func (*AuthStorage) CreateAccessAndRefreshTokens

func (s *AuthStorage) CreateAccessAndRefreshTokens(ctx context.Context, request op.TokenRequest, currentRefreshToken string) (accessTokenID string, newRefreshToken string, expiration time.Time, err error)

func (*AuthStorage) CreateAccessToken

func (s *AuthStorage) CreateAccessToken(ctx context.Context, request op.TokenRequest) (string, time.Time, error)

func (*AuthStorage) CreateAuthRequest

func (s *AuthStorage) CreateAuthRequest(_ context.Context, authReq *oidc.AuthRequest, _ string) (op.AuthRequest, error)

func (*AuthStorage) DeleteAuthRequest

func (s *AuthStorage) DeleteAuthRequest(context.Context, string) error

func (*AuthStorage) GetClientByClientID

func (s *AuthStorage) GetClientByClientID(_ context.Context, id string) (op.Client, error)

func (*AuthStorage) GetKey

func (s *AuthStorage) GetKey(_ context.Context) (*rsa.PrivateKey, error)

func (*AuthStorage) GetKeyByIDAndUserID

func (s *AuthStorage) GetKeyByIDAndUserID(_ context.Context, _, _ string) (*jose.JSONWebKey, error)

func (*AuthStorage) GetKeySet

func (s *AuthStorage) GetKeySet(_ context.Context) (*jose.JSONWebKeySet, error)

func (*AuthStorage) GetPrivateClaimsFromScopes

func (s *AuthStorage) GetPrivateClaimsFromScopes(_ context.Context, _, _ string, _ []string) (map[string]interface{}, error)

func (*AuthStorage) GetSigningKey

func (s *AuthStorage) GetSigningKey(_ context.Context, keyCh chan<- jose.SigningKey)

func (*AuthStorage) Health

func (s *AuthStorage) Health(ctx context.Context) error

func (*AuthStorage) RevokeToken

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

func (*AuthStorage) SaveAuthCode

func (s *AuthStorage) SaveAuthCode(_ context.Context, id, code string) error

func (*AuthStorage) SetIntrospectionFromToken

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

func (*AuthStorage) SetUserinfoFromScopes

func (s *AuthStorage) SetUserinfoFromScopes(ctx context.Context, userinfo oidc.UserInfoSetter, _, _ string, _ []string) error

func (*AuthStorage) SetUserinfoFromToken

func (s *AuthStorage) SetUserinfoFromToken(ctx context.Context, userinfo oidc.UserInfoSetter, _, _, _ string) error

func (*AuthStorage) TerminateSession

func (s *AuthStorage) TerminateSession(_ context.Context, userID, clientID string) error

func (*AuthStorage) TokenRequestByRefreshToken

func (s *AuthStorage) TokenRequestByRefreshToken(ctx context.Context, refreshToken string) (op.RefreshTokenRequest, error)

func (*AuthStorage) ValidateJWTProfileScopes

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

type ConfClient

type ConfClient struct {
	ID string
	// contains filtered or unexported fields
}

func (*ConfClient) AccessTokenType

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

func (*ConfClient) AllowedScopes

func (c *ConfClient) AllowedScopes() []string

func (*ConfClient) ApplicationType

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

func (*ConfClient) AuthMethod

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

func (*ConfClient) ClockSkew

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

func (*ConfClient) DevMode

func (c *ConfClient) DevMode() bool

func (*ConfClient) GetID

func (c *ConfClient) GetID() string

func (*ConfClient) GrantTypes

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

func (*ConfClient) IDTokenLifetime

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

func (*ConfClient) IDTokenUserinfoClaimsAssertion

func (c *ConfClient) IDTokenUserinfoClaimsAssertion() bool

func (*ConfClient) IsScopeAllowed

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

func (*ConfClient) LoginURL

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

func (*ConfClient) PostLogoutRedirectURIs

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

func (*ConfClient) RedirectURIs

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

func (*ConfClient) ResponseTypes

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

func (*ConfClient) RestrictAdditionalAccessTokenScopes

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

func (*ConfClient) RestrictAdditionalIdTokenScopes

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

Jump to

Keyboard shortcuts

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