Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.1-0.20240709092903-309b11f85c73 DO NOT EDIT.
Package api is a generated GoMock package.
Index ¶
- Constants
- func AccessLogger(next http.Handler) http.Handler
- func ConfigureDatastore(ctx context.Context, cfg *config.Config, opt *option.Option) error
- func GetSwagger() (swagger *openapi3.T, err error)
- func InitAuthentication(opt *option.Option)
- func InitAuthorizationGet(opt *option.Option)
- func InitConfiguration()
- func InitConsent(opt *option.Option)
- func InitHandler(opt *option.Option)
- func InitHealthCheck(opt *option.Option)
- func InitJwks()
- func InitRegistration(opt *option.Option)
- func InitToken(opt *option.Option)
- func InitUserInfo(opt *option.Option)
- func LogError(r *http.Request, err error, msg *string)
- func LogInfo(r *http.Request, msg *string)
- func MuxWithOptions(hi HandlerInterface, option *ChiServerOptions, appOption *option.Option) (*chi.Mux, error)
- func NewMux(ctx context.Context, cfg *config.Config, logger *zerolog.Logger) (http.Handler, func(), error)
- func NewOIDCRequestParamValidator() (*validator.Validate, error)
- func NewOapiAuthentication(opt *option.Option) openapi3filter.AuthenticationFunc
- func NewOapiErrorHandler() nethttpmiddleware.ErrorHandler
- func NewOption() (*option.Option, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func Redirect(w http.ResponseWriter, r *http.Request, path string, code int)
- func RespondAuthorizationRequestError(w http.ResponseWriter, r *http.Request, redirectUri, state string, ...)
- func RespondJSON(w http.ResponseWriter, r *http.Request, statusCode int, ...)
- func RespondJSON200(w http.ResponseWriter, r *http.Request)
- func RespondJSON400(w http.ResponseWriter, r *http.Request, summary xerr.PublicError, ...)
- func RespondJSON401(w http.ResponseWriter, r *http.Request, summary xerr.PublicError, ...)
- func RespondJSON404(w http.ResponseWriter)
- func RespondJSON500(w http.ResponseWriter, r *http.Request, err error)
- func RespondJSON503(w http.ResponseWriter, r *http.Request, err error)
- func RespondServerError(w http.ResponseWriter, r *http.Request, err error)
- func RespondTokenRequestError(w http.ResponseWriter, r *http.Request, err xerr.OIDCError)
- func SecretKey(email string) (string, error)
- type AccessTokenKey
- type AccessTokenParser
- type AuthCodeGrantAcceptor
- type AuthCodeRevoker
- type AuthenticateJSONBody
- type AuthenticateJSONRequestBody
- type AuthenticateParams
- type Authentication
- type Authenticator
- type AuthorizationGet
- type AuthorizeParams
- type AuthorizePost
- type Authorizer
- type CacheStatusChecker
- type ChiServerOptions
- type ClientID
- type Code
- type Configuration
- type ConfigurationResponse
- type Consent
- type ConsentAcceptor
- type ConsentParams
- type ConsentVerifier
- type CredentialValidator
- type DBStatusChecker
- type Display
- type DisplayValuesSupported
- type ErrorResponse
- type GrantType
- type HandlerImpl
- func (_ *HandlerImpl) Authenticate(w http.ResponseWriter, r *http.Request)
- func (_ *HandlerImpl) Authorize(w http.ResponseWriter, r *http.Request)
- func (_ *HandlerImpl) CheckHealth(w http.ResponseWriter, r *http.Request)
- func (_ *HandlerImpl) Configuration(w http.ResponseWriter, r *http.Request)
- func (_ *HandlerImpl) Consent(w http.ResponseWriter, r *http.Request)
- func (_ *HandlerImpl) Jwks(w http.ResponseWriter, r *http.Request)
- func (_ *HandlerImpl) Register(w http.ResponseWriter, r *http.Request)
- func (_ *HandlerImpl) Token(w http.ResponseWriter, r *http.Request)
- func (_ *HandlerImpl) UserInfo(w http.ResponseWriter, r *http.Request)
- type HandlerInterface
- type HandlerInterfaceWrapper
- type Health
- type HealthCheck
- type HealthChecker
- type IDTokenSigningAlgValuesSupported
- type InternalServerError
- type InvalidParamFormatError
- type InvalidRequest
- type JWK
- type JWKCrv
- type JWKKty
- type Jwks
- type JwksResponse
- type MaxAge
- type MiddlewareFunc
- type MiddlewareFuncMap
- func (mfm *MiddlewareFuncMap) SetAuthenticateMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
- func (mfm *MiddlewareFuncMap) SetAuthorizeMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
- func (mfm *MiddlewareFuncMap) SetCheckHealthMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
- func (mfm *MiddlewareFuncMap) SetConfigurationMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
- func (mfm *MiddlewareFuncMap) SetConsentMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
- func (mfm *MiddlewareFuncMap) SetJwksMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
- func (mfm *MiddlewareFuncMap) SetRegisterMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
- func (mfm *MiddlewareFuncMap) SetTokenMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
- func (mfm *MiddlewareFuncMap) SetUserInfoMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
- type MockAccessTokenParser
- type MockAccessTokenParserMockRecorder
- type MockAuthCodeGrantAcceptor
- func (m *MockAuthCodeGrantAcceptor) EXPECT() *MockAuthCodeGrantAcceptorMockRecorder
- func (m *MockAuthCodeGrantAcceptor) GenerateAccessToken(uid typedef.UserID, claims map[string]any) (string, error)
- func (m *MockAuthCodeGrantAcceptor) GenerateIDToken(uid typedef.UserID, audiences []string, authTime time.Time, nonce string) (string, error)
- func (m *MockAuthCodeGrantAcceptor) GenerateRefreshToken(uid typedef.UserID, claims map[string]any) (string, error)
- func (m *MockAuthCodeGrantAcceptor) RevokeAuthCode(ctx context.Context, code string, clientID typedef.ClientID) error
- type MockAuthCodeGrantAcceptorMockRecorder
- func (mr *MockAuthCodeGrantAcceptorMockRecorder) GenerateAccessToken(uid, claims any) *gomock.Call
- func (mr *MockAuthCodeGrantAcceptorMockRecorder) GenerateIDToken(uid, audiences, authTime, nonce any) *gomock.Call
- func (mr *MockAuthCodeGrantAcceptorMockRecorder) GenerateRefreshToken(uid, claims any) *gomock.Call
- func (mr *MockAuthCodeGrantAcceptorMockRecorder) RevokeAuthCode(ctx, code, clientID any) *gomock.Call
- type MockAuthCodeRevoker
- type MockAuthCodeRevokerMockRecorder
- type MockAuthenticator
- type MockAuthenticatorMockRecorder
- type MockAuthorizer
- func (m *MockAuthorizer) Authorize(ctx context.Context, clientID typedef.ClientID, redirectURI, state string) (*url.URL, string, error)
- func (m *MockAuthorizer) EXPECT() *MockAuthorizerMockRecorder
- func (m *MockAuthorizer) SaveAuthorizationRequestFingerprint(ctx context.Context, clientID typedef.ClientID, ...) error
- type MockAuthorizerMockRecorder
- type MockCacheStatusChecker
- type MockCacheStatusCheckerMockRecorder
- type MockConsentAcceptor
- type MockConsentAcceptorMockRecorder
- type MockConsentVerifier
- type MockConsentVerifierMockRecorder
- type MockCredentialValidator
- type MockCredentialValidatorMockRecorder
- type MockDBStatusChecker
- type MockDBStatusCheckerMockRecorder
- type MockHealthChecker
- type MockHealthCheckerMockRecorder
- type MockPasswordVerifier
- type MockPasswordVerifierMockRecorder
- type MockRefreshTokenGrantAcceptor
- func (m *MockRefreshTokenGrantAcceptor) EXPECT() *MockRefreshTokenGrantAcceptorMockRecorder
- func (m *MockRefreshTokenGrantAcceptor) ExtractUserID(refreshToken string) (typedef.UserID, error)
- func (m *MockRefreshTokenGrantAcceptor) GenerateAccessToken(uid typedef.UserID, claims map[string]any) (string, error)
- func (m *MockRefreshTokenGrantAcceptor) GenerateRefreshToken(uid typedef.UserID, claims map[string]any) (string, error)
- func (m *MockRefreshTokenGrantAcceptor) VerifyRefreshToken(ctx context.Context, token string, clientID typedef.ClientID) error
- type MockRefreshTokenGrantAcceptorMockRecorder
- func (mr *MockRefreshTokenGrantAcceptorMockRecorder) ExtractUserID(refreshToken any) *gomock.Call
- func (mr *MockRefreshTokenGrantAcceptorMockRecorder) GenerateAccessToken(uid, claims any) *gomock.Call
- func (mr *MockRefreshTokenGrantAcceptorMockRecorder) GenerateRefreshToken(uid, claims any) *gomock.Call
- func (mr *MockRefreshTokenGrantAcceptorMockRecorder) VerifyRefreshToken(ctx, token, clientID any) *gomock.Call
- type MockRefreshTokenVerifier
- type MockRefreshTokenVerifierMockRecorder
- type MockRequestFingerprintSaver
- type MockRequestFingerprintSaverMockRecorder
- type MockTokenCacheReadWriter
- func (m *MockTokenCacheReadWriter) EXPECT() *MockTokenCacheReadWriterMockRecorder
- func (m *MockTokenCacheReadWriter) ReadAuthorizationRequestFingerprint(ctx context.Context, clientID typedef.ClientID, authCode string) (*typedef.AuthorizationRequestFingerprint, error)
- func (m *MockTokenCacheReadWriter) WriteRefreshToken(ctx context.Context, token string, clientID typedef.ClientID, ...) error
- type MockTokenCacheReadWriterMockRecorder
- type MockUserIDExtractor
- type MockUserIDExtractorMockRecorder
- type MockUserInfoReader
- type MockUserInfoReaderMockRecorder
- type MockUserRegisterer
- type MockUserRegistererMockRecorder
- type Nonce
- type OIDCError
- type PasswordVerifier
- type Prompt
- type RedirectURI
- type RefreshTokenGrantAcceptor
- type RefreshTokenVerifier
- type RegisterJSONBody
- type RegisterJSONRequestBody
- type Registration
- type RequestFingerprintSaver
- type RequiredHeaderError
- type RequiredParamError
- type Response
- type ResponseType
- type ResponseTypesSupported
- type Scope
- type ScopesSupported
- type SessionId
- type State
- type SubjectTypesSupported
- type TOTP
- type Token
- type TokenCacheReadWriter
- type TokenEndpointAuthMethodsSupported
- type TokenErrorResponse
- type TokenErrorResponseError
- type TokenFormdataBody
- type TokenFormdataRequestBody
- type TokenParams
- type TokenResponse
- type TokenSet
- type TooManyValuesForParamError
- type UILocalesSupported
- type UnauthorizedRequest
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type User
- type UserIDExtractor
- type UserInfo
- type UserInfoReader
- type UserInfoResponse
- type UserName
- type UserPassword
- type UserRegisterer
Constants ¶
const ( BasicAuthScopes = "basicAuth.Scopes" BearerAuthScopes = "bearerAuth.Scopes" )
Variables ¶
This section is empty.
Functions ¶
func ConfigureDatastore ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func InitAuthentication ¶
func InitAuthorizationGet ¶
func InitConfiguration ¶
func InitConfiguration()
func InitConsent ¶
func InitHandler ¶
func InitHealthCheck ¶
func InitRegistration ¶
func InitUserInfo ¶
func MuxWithOptions ¶
func MuxWithOptions(hi HandlerInterface, option *ChiServerOptions, appOption *option.Option) (*chi.Mux, error)
MuxWithOptions creates http.Handler with additional options
func NewOIDCRequestParamValidator ¶
func NewOIDCRequestParamValidator() (*validator.Validate, error)
func NewOapiAuthentication ¶
func NewOapiAuthentication(opt *option.Option) openapi3filter.AuthenticationFunc
func NewOapiErrorHandler ¶
func NewOapiErrorHandler() nethttpmiddleware.ErrorHandler
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RespondJSON ¶
func RespondJSON200 ¶
func RespondJSON200(w http.ResponseWriter, r *http.Request)
func RespondJSON400 ¶
func RespondJSON400(w http.ResponseWriter, r *http.Request, summary xerr.PublicError, details []string, err error)
func RespondJSON401 ¶
func RespondJSON401(w http.ResponseWriter, r *http.Request, summary xerr.PublicError, details []string, err error)
func RespondJSON404 ¶
func RespondJSON404(w http.ResponseWriter)
func RespondJSON500 ¶
func RespondJSON500(w http.ResponseWriter, r *http.Request, err error)
func RespondJSON503 ¶
func RespondJSON503(w http.ResponseWriter, r *http.Request, err error)
func RespondServerError ¶
func RespondServerError(w http.ResponseWriter, r *http.Request, err error)
Types ¶
type AccessTokenKey ¶
type AccessTokenKey struct{}
type AccessTokenParser ¶
type AuthCodeGrantAcceptor ¶
type AuthCodeGrantAcceptor interface { AuthCodeRevoker iface.AccessTokenGenerator iface.RefreshTokenGenerator iface.IDTokenGenerator }
type AuthCodeRevoker ¶
type AuthenticateJSONBody ¶
type AuthenticateJSONBody struct { Name string `json:"name" validate:"required"` Password string `json:"password" validate:"required"` }
AuthenticateJSONBody defines parameters for Authenticate.
type AuthenticateJSONRequestBody ¶
type AuthenticateJSONRequestBody AuthenticateJSONBody
AuthenticateJSONRequestBody defines body for Authenticate for application/json ContentType.
type AuthenticateParams ¶
type AuthenticateParams struct { // Sid Session ID Sid *SessionId `form:"sid,omitempty" json:"-" url:"sid"` }
AuthenticateParams defines parameters for Authenticate.
type Authentication ¶
type Authentication struct {
// contains filtered or unexported fields
}
func (*Authentication) ServeHTTP ¶
func (ah *Authentication) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Authenticator ¶
type Authenticator interface { ConsentVerifier PasswordVerifier }
type AuthorizationGet ¶
type AuthorizationGet struct {
// contains filtered or unexported fields
}
func (*AuthorizationGet) ServeHTTP ¶
func (a *AuthorizationGet) ServeHTTP(w http.ResponseWriter, r *http.Request)
type AuthorizeParams ¶
type AuthorizeParams struct { // ClientID Represents "client_id" parameter ClientID ClientID `form:"client_id" json:"client_id" schema:"client_id" url:"client_id" validate:"required,alphanum"` // Nonce Represents "nonce" parameter Nonce Nonce `form:"nonce" json:"nonce" schema:"nonce" url:"nonce" validate:"required,alphanum"` // RedirectURI Represents "redirect_uri" parameter RedirectURI RedirectURI `form:"redirect_uri" json:"redirect_uri" schema:"redirect_uri" url:"redirect_uri" validate:"required,url_encoded"` // ResponseType Represents "response_type" parameter ResponseType ResponseType `` /* 128-byte string literal not displayed */ // Scope Represents "scope" parameter Scope Scope `form:"scope" json:"scope" schema:"scope" url:"scope" validate:"required,scope-validator"` // State Represents "state" parameter State State `form:"state" json:"state" schema:"state" url:"state" validate:"required,alphanum"` // Display Represents "display" parameter Display *Display `form:"display,omitempty" json:"display,omitempty" schema:"display" url:"display" validate:"display-validator"` // MaxAge Represents "max_age" parameter MaxAge *MaxAge `form:"max_age,omitempty" json:"max_age,omitempty" schema:"max_age" url:"max_age" validate:"numeric"` // Prompt Represents "prompt" parameter Prompt *Prompt `form:"prompt,omitempty" json:"prompt,omitempty" schema:"prompt" url:"prompt" validate:"prompt-validator"` // Sid Session ID Sid *SessionId `form:"sid,omitempty" json:"-" url:"sid"` }
AuthorizeParams defines parameters for Authorize.
type AuthorizePost ¶
type AuthorizePost struct {
// contains filtered or unexported fields
}
func NewAuthorizePost ¶
func NewAuthorizePost() *AuthorizePost
func (*AuthorizePost) ServeHTTP ¶
func (p *AuthorizePost) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Authorizer ¶
type CacheStatusChecker ¶
type ChiServerOptions ¶
type ChiServerOptions struct { BaseRouter *chi.Mux Middlewares *MiddlewareFuncMap ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type Configuration ¶
type Configuration struct{}
func (*Configuration) ServeHTTP ¶
func (c *Configuration) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ConfigurationResponse ¶
type ConfigurationResponse struct { AuthorizationEndpoint string `json:"authorization_endpoint"` DisplayValuesSupported []DisplayValuesSupported `json:"display_values_supported"` IDTokenSigningAlgValuesSupported []IDTokenSigningAlgValuesSupported `json:"id_token_signing_alg_values_supported"` Issuer string `json:"issuer"` JWKsURI string `json:"jwks_uri"` ResponseTypesSupported []ResponseTypesSupported `json:"response_types_supported"` ScopesSupported []ScopesSupported `json:"scopes_supported"` SubjectTypesSupported []SubjectTypesSupported `json:"subject_types_supported"` TokenEndpoint string `json:"token_endpoint"` TokenEndpointAuthMethodsSupported []TokenEndpointAuthMethodsSupported `json:"token_endpoint_auth_methods_supported"` UILocalesSupported []UILocalesSupported `json:"ui_locales_supported"` UserInfoEndpoint string `json:"userinfo_endpoint"` }
ConfigurationResponse Represents the configuration information of OpenID Provider.
type ConsentAcceptor ¶
type ConsentParams ¶
type ConsentParams struct { // Sid Session ID Sid *SessionId `form:"sid,omitempty" json:"-" url:"sid"` }
ConsentParams defines parameters for Consent.
type ConsentVerifier ¶
type CredentialValidator ¶
type DBStatusChecker ¶
type DisplayValuesSupported ¶
type DisplayValuesSupported string
DisplayValuesSupported defines model for ConfigurationResponse.display_values_supported.
const (
Page DisplayValuesSupported = "page"
)
Defines values for DisplayValuesSupported.
type ErrorResponse ¶
type ErrorResponse struct { Details *[]string `json:"details,omitempty"` Status uint64 `json:"status"` Summary xerr.PublicError `json:"summary"` }
ErrorResponse Represents error response
type HandlerImpl ¶
type HandlerImpl struct{}
func (*HandlerImpl) Authenticate ¶
func (_ *HandlerImpl) Authenticate(w http.ResponseWriter, r *http.Request)
func (*HandlerImpl) Authorize ¶
func (_ *HandlerImpl) Authorize(w http.ResponseWriter, r *http.Request)
func (*HandlerImpl) CheckHealth ¶
func (_ *HandlerImpl) CheckHealth(w http.ResponseWriter, r *http.Request)
func (*HandlerImpl) Configuration ¶
func (_ *HandlerImpl) Configuration(w http.ResponseWriter, r *http.Request)
func (*HandlerImpl) Consent ¶
func (_ *HandlerImpl) Consent(w http.ResponseWriter, r *http.Request)
func (*HandlerImpl) Jwks ¶
func (_ *HandlerImpl) Jwks(w http.ResponseWriter, r *http.Request)
func (*HandlerImpl) Register ¶
func (_ *HandlerImpl) Register(w http.ResponseWriter, r *http.Request)
func (*HandlerImpl) Token ¶
func (_ *HandlerImpl) Token(w http.ResponseWriter, r *http.Request)
func (*HandlerImpl) UserInfo ¶
func (_ *HandlerImpl) UserInfo(w http.ResponseWriter, r *http.Request)
type HandlerInterface ¶
type HandlerInterface interface { // GET: /.well-known/openid-configuration Configuration(w http.ResponseWriter, r *http.Request) // GET: /authorization Authorize(w http.ResponseWriter, r *http.Request) // GET: /health CheckHealth(w http.ResponseWriter, r *http.Request) // GET: /jwks Jwks(w http.ResponseWriter, r *http.Request) // POST: /token Token(w http.ResponseWriter, r *http.Request) // POST: /user/authentication Authenticate(w http.ResponseWriter, r *http.Request) // POST: /user/consent Consent(w http.ResponseWriter, r *http.Request) // POST: /user/registration Register(w http.ResponseWriter, r *http.Request) // GET: /userinfo UserInfo(w http.ResponseWriter, r *http.Request) }
HandlerInterface represents all server handlers.
type HandlerInterfaceWrapper ¶
type HandlerInterfaceWrapper struct { Handler HandlerInterface ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
HandlerInterfaceWrapper converts contexts to parameters.
type Health ¶
type Health struct {
Status uint64 `json:"status"`
}
Health Represents the status of service.
type HealthCheck ¶
type HealthCheck struct {
// contains filtered or unexported fields
}
func (*HealthCheck) ServeHTTP ¶
func (c *HealthCheck) ServeHTTP(w http.ResponseWriter, r *http.Request)
type HealthChecker ¶
type HealthChecker interface { CacheStatusChecker DBStatusChecker }
type IDTokenSigningAlgValuesSupported ¶
type IDTokenSigningAlgValuesSupported string
IDTokenSigningAlgValuesSupported defines model for ConfigurationResponse.id_token_signing_alg_values_supported.
const (
ES256 IDTokenSigningAlgValuesSupported = "ES256"
)
Defines values for IDTokenSigningAlgValuesSupported.
type InternalServerError ¶
type InternalServerError = ErrorResponse
InternalServerError Represents error response
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type JWK ¶
type JWK struct { // Crv ECDSA Crv JWKCrv `json:"crv"` // Kid Key ID Kid string `json:"kid"` // Kty Key type ( Only supports elliptic curve key ) Kty JWKKty `json:"kty"` // Use Public key use Use string `json:"use"` // X X coordinate of elliptic curve key X string `json:"x"` // Y Y coordinate of elliptic curve key Y string `json:"y"` }
JWK JSON Web Key format
type JWKCrv ¶
type JWKCrv string
JWKCrv ECDSA
const (
P256 JWKCrv = "P-256"
)
Defines values for JWKCrv.
type JWKKty ¶
type JWKKty string
JWKKty Key type ( Only supports elliptic curve key )
const (
EC JWKKty = "EC"
)
Defines values for JWKKty.
type JwksResponse ¶
type JwksResponse struct { // Keys The set of JSON Web Key Keys []JWK `json:"keys"` }
JwksResponse Represents the set of JSON Web Key
type MiddlewareFunc ¶
func InjectRequestParameter ¶
func InjectRequestParameter() MiddlewareFunc
func RestoreSession ¶
func RestoreSession(opt *option.Option) MiddlewareFunc
type MiddlewareFuncMap ¶
type MiddlewareFuncMap struct {
// contains filtered or unexported fields
}
func NewMiddlewareFuncMap ¶
func NewMiddlewareFuncMap() *MiddlewareFuncMap
func (*MiddlewareFuncMap) SetAuthenticateMW ¶
func (mfm *MiddlewareFuncMap) SetAuthenticateMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
func (*MiddlewareFuncMap) SetAuthorizeMW ¶
func (mfm *MiddlewareFuncMap) SetAuthorizeMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
func (*MiddlewareFuncMap) SetCheckHealthMW ¶
func (mfm *MiddlewareFuncMap) SetCheckHealthMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
func (*MiddlewareFuncMap) SetConfigurationMW ¶
func (mfm *MiddlewareFuncMap) SetConfigurationMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
func (*MiddlewareFuncMap) SetConsentMW ¶
func (mfm *MiddlewareFuncMap) SetConsentMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
func (*MiddlewareFuncMap) SetJwksMW ¶
func (mfm *MiddlewareFuncMap) SetJwksMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
func (*MiddlewareFuncMap) SetRegisterMW ¶
func (mfm *MiddlewareFuncMap) SetRegisterMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
func (*MiddlewareFuncMap) SetTokenMW ¶
func (mfm *MiddlewareFuncMap) SetTokenMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
func (*MiddlewareFuncMap) SetUserInfoMW ¶
func (mfm *MiddlewareFuncMap) SetUserInfoMW(mf ...MiddlewareFunc) *MiddlewareFuncMap
type MockAccessTokenParser ¶
type MockAccessTokenParser struct {
// contains filtered or unexported fields
}
MockAccessTokenParser is a mock of AccessTokenParser interface.
func NewMockAccessTokenParser ¶
func NewMockAccessTokenParser(ctrl *gomock.Controller) *MockAccessTokenParser
NewMockAccessTokenParser creates a new mock instance.
func (*MockAccessTokenParser) EXPECT ¶
func (m *MockAccessTokenParser) EXPECT() *MockAccessTokenParserMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAccessTokenParser) ParseAccessToken ¶
func (m *MockAccessTokenParser) ParseAccessToken(token string) (jwt.Token, error)
ParseAccessToken mocks base method.
type MockAccessTokenParserMockRecorder ¶
type MockAccessTokenParserMockRecorder struct {
// contains filtered or unexported fields
}
MockAccessTokenParserMockRecorder is the mock recorder for MockAccessTokenParser.
func (*MockAccessTokenParserMockRecorder) ParseAccessToken ¶
func (mr *MockAccessTokenParserMockRecorder) ParseAccessToken(token any) *gomock.Call
ParseAccessToken indicates an expected call of ParseAccessToken.
type MockAuthCodeGrantAcceptor ¶
type MockAuthCodeGrantAcceptor struct {
// contains filtered or unexported fields
}
MockAuthCodeGrantAcceptor is a mock of AuthCodeGrantAcceptor interface.
func NewMockAuthCodeGrantAcceptor ¶
func NewMockAuthCodeGrantAcceptor(ctrl *gomock.Controller) *MockAuthCodeGrantAcceptor
NewMockAuthCodeGrantAcceptor creates a new mock instance.
func (*MockAuthCodeGrantAcceptor) EXPECT ¶
func (m *MockAuthCodeGrantAcceptor) EXPECT() *MockAuthCodeGrantAcceptorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAuthCodeGrantAcceptor) GenerateAccessToken ¶
func (m *MockAuthCodeGrantAcceptor) GenerateAccessToken(uid typedef.UserID, claims map[string]any) (string, error)
GenerateAccessToken mocks base method.
func (*MockAuthCodeGrantAcceptor) GenerateIDToken ¶
func (m *MockAuthCodeGrantAcceptor) GenerateIDToken(uid typedef.UserID, audiences []string, authTime time.Time, nonce string) (string, error)
GenerateIDToken mocks base method.
func (*MockAuthCodeGrantAcceptor) GenerateRefreshToken ¶
func (m *MockAuthCodeGrantAcceptor) GenerateRefreshToken(uid typedef.UserID, claims map[string]any) (string, error)
GenerateRefreshToken mocks base method.
func (*MockAuthCodeGrantAcceptor) RevokeAuthCode ¶
func (m *MockAuthCodeGrantAcceptor) RevokeAuthCode(ctx context.Context, code string, clientID typedef.ClientID) error
RevokeAuthCode mocks base method.
type MockAuthCodeGrantAcceptorMockRecorder ¶
type MockAuthCodeGrantAcceptorMockRecorder struct {
// contains filtered or unexported fields
}
MockAuthCodeGrantAcceptorMockRecorder is the mock recorder for MockAuthCodeGrantAcceptor.
func (*MockAuthCodeGrantAcceptorMockRecorder) GenerateAccessToken ¶
func (mr *MockAuthCodeGrantAcceptorMockRecorder) GenerateAccessToken(uid, claims any) *gomock.Call
GenerateAccessToken indicates an expected call of GenerateAccessToken.
func (*MockAuthCodeGrantAcceptorMockRecorder) GenerateIDToken ¶
func (mr *MockAuthCodeGrantAcceptorMockRecorder) GenerateIDToken(uid, audiences, authTime, nonce any) *gomock.Call
GenerateIDToken indicates an expected call of GenerateIDToken.
func (*MockAuthCodeGrantAcceptorMockRecorder) GenerateRefreshToken ¶
func (mr *MockAuthCodeGrantAcceptorMockRecorder) GenerateRefreshToken(uid, claims any) *gomock.Call
GenerateRefreshToken indicates an expected call of GenerateRefreshToken.
func (*MockAuthCodeGrantAcceptorMockRecorder) RevokeAuthCode ¶
func (mr *MockAuthCodeGrantAcceptorMockRecorder) RevokeAuthCode(ctx, code, clientID any) *gomock.Call
RevokeAuthCode indicates an expected call of RevokeAuthCode.
type MockAuthCodeRevoker ¶
type MockAuthCodeRevoker struct {
// contains filtered or unexported fields
}
MockAuthCodeRevoker is a mock of AuthCodeRevoker interface.
func NewMockAuthCodeRevoker ¶
func NewMockAuthCodeRevoker(ctrl *gomock.Controller) *MockAuthCodeRevoker
NewMockAuthCodeRevoker creates a new mock instance.
func (*MockAuthCodeRevoker) EXPECT ¶
func (m *MockAuthCodeRevoker) EXPECT() *MockAuthCodeRevokerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAuthCodeRevoker) RevokeAuthCode ¶
func (m *MockAuthCodeRevoker) RevokeAuthCode(ctx context.Context, code string, clientID typedef.ClientID) error
RevokeAuthCode mocks base method.
type MockAuthCodeRevokerMockRecorder ¶
type MockAuthCodeRevokerMockRecorder struct {
// contains filtered or unexported fields
}
MockAuthCodeRevokerMockRecorder is the mock recorder for MockAuthCodeRevoker.
func (*MockAuthCodeRevokerMockRecorder) RevokeAuthCode ¶
func (mr *MockAuthCodeRevokerMockRecorder) RevokeAuthCode(ctx, code, clientID any) *gomock.Call
RevokeAuthCode indicates an expected call of RevokeAuthCode.
type MockAuthenticator ¶
type MockAuthenticator struct {
// contains filtered or unexported fields
}
MockAuthenticator is a mock of Authenticator interface.
func NewMockAuthenticator ¶
func NewMockAuthenticator(ctrl *gomock.Controller) *MockAuthenticator
NewMockAuthenticator creates a new mock instance.
func (*MockAuthenticator) EXPECT ¶
func (m *MockAuthenticator) EXPECT() *MockAuthenticatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAuthenticator) VerifyConsent ¶
func (m *MockAuthenticator) VerifyConsent(ctx context.Context, userID typedef.UserID, clientID typedef.ClientID) (bool, error)
VerifyConsent mocks base method.
func (*MockAuthenticator) VerifyPassword ¶
func (m *MockAuthenticator) VerifyPassword(ctx context.Context, name, pw string) (typedef.UserID, error)
VerifyPassword mocks base method.
type MockAuthenticatorMockRecorder ¶
type MockAuthenticatorMockRecorder struct {
// contains filtered or unexported fields
}
MockAuthenticatorMockRecorder is the mock recorder for MockAuthenticator.
func (*MockAuthenticatorMockRecorder) VerifyConsent ¶
func (mr *MockAuthenticatorMockRecorder) VerifyConsent(ctx, userID, clientID any) *gomock.Call
VerifyConsent indicates an expected call of VerifyConsent.
func (*MockAuthenticatorMockRecorder) VerifyPassword ¶
func (mr *MockAuthenticatorMockRecorder) VerifyPassword(ctx, name, pw any) *gomock.Call
VerifyPassword indicates an expected call of VerifyPassword.
type MockAuthorizer ¶
type MockAuthorizer struct {
// contains filtered or unexported fields
}
MockAuthorizer is a mock of Authorizer interface.
func NewMockAuthorizer ¶
func NewMockAuthorizer(ctrl *gomock.Controller) *MockAuthorizer
NewMockAuthorizer creates a new mock instance.
func (*MockAuthorizer) Authorize ¶
func (m *MockAuthorizer) Authorize(ctx context.Context, clientID typedef.ClientID, redirectURI, state string) (*url.URL, string, error)
Authorize mocks base method.
func (*MockAuthorizer) EXPECT ¶
func (m *MockAuthorizer) EXPECT() *MockAuthorizerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAuthorizer) SaveAuthorizationRequestFingerprint ¶
func (m *MockAuthorizer) SaveAuthorizationRequestFingerprint(ctx context.Context, clientID typedef.ClientID, redirectURI, nonce, authCode string) error
SaveAuthorizationRequestFingerprint mocks base method.
type MockAuthorizerMockRecorder ¶
type MockAuthorizerMockRecorder struct {
// contains filtered or unexported fields
}
MockAuthorizerMockRecorder is the mock recorder for MockAuthorizer.
func (*MockAuthorizerMockRecorder) Authorize ¶
func (mr *MockAuthorizerMockRecorder) Authorize(ctx, clientID, redirectURI, state any) *gomock.Call
Authorize indicates an expected call of Authorize.
func (*MockAuthorizerMockRecorder) SaveAuthorizationRequestFingerprint ¶
func (mr *MockAuthorizerMockRecorder) SaveAuthorizationRequestFingerprint(ctx, clientID, redirectURI, nonce, authCode any) *gomock.Call
SaveAuthorizationRequestFingerprint indicates an expected call of SaveAuthorizationRequestFingerprint.
type MockCacheStatusChecker ¶
type MockCacheStatusChecker struct {
// contains filtered or unexported fields
}
MockCacheStatusChecker is a mock of CacheStatusChecker interface.
func NewMockCacheStatusChecker ¶
func NewMockCacheStatusChecker(ctrl *gomock.Controller) *MockCacheStatusChecker
NewMockCacheStatusChecker creates a new mock instance.
func (*MockCacheStatusChecker) CheckCacheStatus ¶
func (m *MockCacheStatusChecker) CheckCacheStatus(ctx context.Context) error
CheckCacheStatus mocks base method.
func (*MockCacheStatusChecker) EXPECT ¶
func (m *MockCacheStatusChecker) EXPECT() *MockCacheStatusCheckerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockCacheStatusCheckerMockRecorder ¶
type MockCacheStatusCheckerMockRecorder struct {
// contains filtered or unexported fields
}
MockCacheStatusCheckerMockRecorder is the mock recorder for MockCacheStatusChecker.
func (*MockCacheStatusCheckerMockRecorder) CheckCacheStatus ¶
func (mr *MockCacheStatusCheckerMockRecorder) CheckCacheStatus(ctx any) *gomock.Call
CheckCacheStatus indicates an expected call of CheckCacheStatus.
type MockConsentAcceptor ¶
type MockConsentAcceptor struct {
// contains filtered or unexported fields
}
MockConsentAcceptor is a mock of ConsentAcceptor interface.
func NewMockConsentAcceptor ¶
func NewMockConsentAcceptor(ctrl *gomock.Controller) *MockConsentAcceptor
NewMockConsentAcceptor creates a new mock instance.
func (*MockConsentAcceptor) AcceptConsent ¶
func (m *MockConsentAcceptor) AcceptConsent(ctx context.Context, userID typedef.UserID, clientID typedef.ClientID) error
AcceptConsent mocks base method.
func (*MockConsentAcceptor) EXPECT ¶
func (m *MockConsentAcceptor) EXPECT() *MockConsentAcceptorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockConsentAcceptorMockRecorder ¶
type MockConsentAcceptorMockRecorder struct {
// contains filtered or unexported fields
}
MockConsentAcceptorMockRecorder is the mock recorder for MockConsentAcceptor.
func (*MockConsentAcceptorMockRecorder) AcceptConsent ¶
func (mr *MockConsentAcceptorMockRecorder) AcceptConsent(ctx, userID, clientID any) *gomock.Call
AcceptConsent indicates an expected call of AcceptConsent.
type MockConsentVerifier ¶
type MockConsentVerifier struct {
// contains filtered or unexported fields
}
MockConsentVerifier is a mock of ConsentVerifier interface.
func NewMockConsentVerifier ¶
func NewMockConsentVerifier(ctrl *gomock.Controller) *MockConsentVerifier
NewMockConsentVerifier creates a new mock instance.
func (*MockConsentVerifier) EXPECT ¶
func (m *MockConsentVerifier) EXPECT() *MockConsentVerifierMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockConsentVerifierMockRecorder ¶
type MockConsentVerifierMockRecorder struct {
// contains filtered or unexported fields
}
MockConsentVerifierMockRecorder is the mock recorder for MockConsentVerifier.
func (*MockConsentVerifierMockRecorder) VerifyConsent ¶
func (mr *MockConsentVerifierMockRecorder) VerifyConsent(ctx, userID, clientID any) *gomock.Call
VerifyConsent indicates an expected call of VerifyConsent.
type MockCredentialValidator ¶
type MockCredentialValidator struct {
// contains filtered or unexported fields
}
MockCredentialValidator is a mock of CredentialValidator interface.
func NewMockCredentialValidator ¶
func NewMockCredentialValidator(ctrl *gomock.Controller) *MockCredentialValidator
NewMockCredentialValidator creates a new mock instance.
func (*MockCredentialValidator) EXPECT ¶
func (m *MockCredentialValidator) EXPECT() *MockCredentialValidatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCredentialValidator) ValidateCredential ¶
func (m *MockCredentialValidator) ValidateCredential(ctx context.Context, clientID typedef.ClientID, clientSecret string) error
ValidateCredential mocks base method.
type MockCredentialValidatorMockRecorder ¶
type MockCredentialValidatorMockRecorder struct {
// contains filtered or unexported fields
}
MockCredentialValidatorMockRecorder is the mock recorder for MockCredentialValidator.
func (*MockCredentialValidatorMockRecorder) ValidateCredential ¶
func (mr *MockCredentialValidatorMockRecorder) ValidateCredential(ctx, clientID, clientSecret any) *gomock.Call
ValidateCredential indicates an expected call of ValidateCredential.
type MockDBStatusChecker ¶
type MockDBStatusChecker struct {
// contains filtered or unexported fields
}
MockDBStatusChecker is a mock of DBStatusChecker interface.
func NewMockDBStatusChecker ¶
func NewMockDBStatusChecker(ctrl *gomock.Controller) *MockDBStatusChecker
NewMockDBStatusChecker creates a new mock instance.
func (*MockDBStatusChecker) CheckDBStatus ¶
func (m *MockDBStatusChecker) CheckDBStatus(ctx context.Context) error
CheckDBStatus mocks base method.
func (*MockDBStatusChecker) EXPECT ¶
func (m *MockDBStatusChecker) EXPECT() *MockDBStatusCheckerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockDBStatusCheckerMockRecorder ¶
type MockDBStatusCheckerMockRecorder struct {
// contains filtered or unexported fields
}
MockDBStatusCheckerMockRecorder is the mock recorder for MockDBStatusChecker.
func (*MockDBStatusCheckerMockRecorder) CheckDBStatus ¶
func (mr *MockDBStatusCheckerMockRecorder) CheckDBStatus(ctx any) *gomock.Call
CheckDBStatus indicates an expected call of CheckDBStatus.
type MockHealthChecker ¶
type MockHealthChecker struct {
// contains filtered or unexported fields
}
MockHealthChecker is a mock of HealthChecker interface.
func NewMockHealthChecker ¶
func NewMockHealthChecker(ctrl *gomock.Controller) *MockHealthChecker
NewMockHealthChecker creates a new mock instance.
func (*MockHealthChecker) CheckCacheStatus ¶
func (m *MockHealthChecker) CheckCacheStatus(ctx context.Context) error
CheckCacheStatus mocks base method.
func (*MockHealthChecker) CheckDBStatus ¶
func (m *MockHealthChecker) CheckDBStatus(ctx context.Context) error
CheckDBStatus mocks base method.
func (*MockHealthChecker) EXPECT ¶
func (m *MockHealthChecker) EXPECT() *MockHealthCheckerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockHealthCheckerMockRecorder ¶
type MockHealthCheckerMockRecorder struct {
// contains filtered or unexported fields
}
MockHealthCheckerMockRecorder is the mock recorder for MockHealthChecker.
func (*MockHealthCheckerMockRecorder) CheckCacheStatus ¶
func (mr *MockHealthCheckerMockRecorder) CheckCacheStatus(ctx any) *gomock.Call
CheckCacheStatus indicates an expected call of CheckCacheStatus.
func (*MockHealthCheckerMockRecorder) CheckDBStatus ¶
func (mr *MockHealthCheckerMockRecorder) CheckDBStatus(ctx any) *gomock.Call
CheckDBStatus indicates an expected call of CheckDBStatus.
type MockPasswordVerifier ¶
type MockPasswordVerifier struct {
// contains filtered or unexported fields
}
MockPasswordVerifier is a mock of PasswordVerifier interface.
func NewMockPasswordVerifier ¶
func NewMockPasswordVerifier(ctrl *gomock.Controller) *MockPasswordVerifier
NewMockPasswordVerifier creates a new mock instance.
func (*MockPasswordVerifier) EXPECT ¶
func (m *MockPasswordVerifier) EXPECT() *MockPasswordVerifierMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPasswordVerifier) VerifyPassword ¶
func (m *MockPasswordVerifier) VerifyPassword(ctx context.Context, name, pw string) (typedef.UserID, error)
VerifyPassword mocks base method.
type MockPasswordVerifierMockRecorder ¶
type MockPasswordVerifierMockRecorder struct {
// contains filtered or unexported fields
}
MockPasswordVerifierMockRecorder is the mock recorder for MockPasswordVerifier.
func (*MockPasswordVerifierMockRecorder) VerifyPassword ¶
func (mr *MockPasswordVerifierMockRecorder) VerifyPassword(ctx, name, pw any) *gomock.Call
VerifyPassword indicates an expected call of VerifyPassword.
type MockRefreshTokenGrantAcceptor ¶
type MockRefreshTokenGrantAcceptor struct {
// contains filtered or unexported fields
}
MockRefreshTokenGrantAcceptor is a mock of RefreshTokenGrantAcceptor interface.
func NewMockRefreshTokenGrantAcceptor ¶
func NewMockRefreshTokenGrantAcceptor(ctrl *gomock.Controller) *MockRefreshTokenGrantAcceptor
NewMockRefreshTokenGrantAcceptor creates a new mock instance.
func (*MockRefreshTokenGrantAcceptor) EXPECT ¶
func (m *MockRefreshTokenGrantAcceptor) EXPECT() *MockRefreshTokenGrantAcceptorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRefreshTokenGrantAcceptor) ExtractUserID ¶
func (m *MockRefreshTokenGrantAcceptor) ExtractUserID(refreshToken string) (typedef.UserID, error)
ExtractUserID mocks base method.
func (*MockRefreshTokenGrantAcceptor) GenerateAccessToken ¶
func (m *MockRefreshTokenGrantAcceptor) GenerateAccessToken(uid typedef.UserID, claims map[string]any) (string, error)
GenerateAccessToken mocks base method.
func (*MockRefreshTokenGrantAcceptor) GenerateRefreshToken ¶
func (m *MockRefreshTokenGrantAcceptor) GenerateRefreshToken(uid typedef.UserID, claims map[string]any) (string, error)
GenerateRefreshToken mocks base method.
func (*MockRefreshTokenGrantAcceptor) VerifyRefreshToken ¶
func (m *MockRefreshTokenGrantAcceptor) VerifyRefreshToken(ctx context.Context, token string, clientID typedef.ClientID) error
VerifyRefreshToken mocks base method.
type MockRefreshTokenGrantAcceptorMockRecorder ¶
type MockRefreshTokenGrantAcceptorMockRecorder struct {
// contains filtered or unexported fields
}
MockRefreshTokenGrantAcceptorMockRecorder is the mock recorder for MockRefreshTokenGrantAcceptor.
func (*MockRefreshTokenGrantAcceptorMockRecorder) ExtractUserID ¶
func (mr *MockRefreshTokenGrantAcceptorMockRecorder) ExtractUserID(refreshToken any) *gomock.Call
ExtractUserID indicates an expected call of ExtractUserID.
func (*MockRefreshTokenGrantAcceptorMockRecorder) GenerateAccessToken ¶
func (mr *MockRefreshTokenGrantAcceptorMockRecorder) GenerateAccessToken(uid, claims any) *gomock.Call
GenerateAccessToken indicates an expected call of GenerateAccessToken.
func (*MockRefreshTokenGrantAcceptorMockRecorder) GenerateRefreshToken ¶
func (mr *MockRefreshTokenGrantAcceptorMockRecorder) GenerateRefreshToken(uid, claims any) *gomock.Call
GenerateRefreshToken indicates an expected call of GenerateRefreshToken.
func (*MockRefreshTokenGrantAcceptorMockRecorder) VerifyRefreshToken ¶
func (mr *MockRefreshTokenGrantAcceptorMockRecorder) VerifyRefreshToken(ctx, token, clientID any) *gomock.Call
VerifyRefreshToken indicates an expected call of VerifyRefreshToken.
type MockRefreshTokenVerifier ¶
type MockRefreshTokenVerifier struct {
// contains filtered or unexported fields
}
MockRefreshTokenVerifier is a mock of RefreshTokenVerifier interface.
func NewMockRefreshTokenVerifier ¶
func NewMockRefreshTokenVerifier(ctrl *gomock.Controller) *MockRefreshTokenVerifier
NewMockRefreshTokenVerifier creates a new mock instance.
func (*MockRefreshTokenVerifier) EXPECT ¶
func (m *MockRefreshTokenVerifier) EXPECT() *MockRefreshTokenVerifierMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRefreshTokenVerifier) VerifyRefreshToken ¶
func (m *MockRefreshTokenVerifier) VerifyRefreshToken(ctx context.Context, token string, clientID typedef.ClientID) error
VerifyRefreshToken mocks base method.
type MockRefreshTokenVerifierMockRecorder ¶
type MockRefreshTokenVerifierMockRecorder struct {
// contains filtered or unexported fields
}
MockRefreshTokenVerifierMockRecorder is the mock recorder for MockRefreshTokenVerifier.
func (*MockRefreshTokenVerifierMockRecorder) VerifyRefreshToken ¶
func (mr *MockRefreshTokenVerifierMockRecorder) VerifyRefreshToken(ctx, token, clientID any) *gomock.Call
VerifyRefreshToken indicates an expected call of VerifyRefreshToken.
type MockRequestFingerprintSaver ¶
type MockRequestFingerprintSaver struct {
// contains filtered or unexported fields
}
MockRequestFingerprintSaver is a mock of RequestFingerprintSaver interface.
func NewMockRequestFingerprintSaver ¶
func NewMockRequestFingerprintSaver(ctrl *gomock.Controller) *MockRequestFingerprintSaver
NewMockRequestFingerprintSaver creates a new mock instance.
func (*MockRequestFingerprintSaver) EXPECT ¶
func (m *MockRequestFingerprintSaver) EXPECT() *MockRequestFingerprintSaverMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRequestFingerprintSaver) SaveAuthorizationRequestFingerprint ¶
func (m *MockRequestFingerprintSaver) SaveAuthorizationRequestFingerprint(ctx context.Context, clientID typedef.ClientID, redirectURI, nonce, authCode string) error
SaveAuthorizationRequestFingerprint mocks base method.
type MockRequestFingerprintSaverMockRecorder ¶
type MockRequestFingerprintSaverMockRecorder struct {
// contains filtered or unexported fields
}
MockRequestFingerprintSaverMockRecorder is the mock recorder for MockRequestFingerprintSaver.
func (*MockRequestFingerprintSaverMockRecorder) SaveAuthorizationRequestFingerprint ¶
func (mr *MockRequestFingerprintSaverMockRecorder) SaveAuthorizationRequestFingerprint(ctx, clientID, redirectURI, nonce, authCode any) *gomock.Call
SaveAuthorizationRequestFingerprint indicates an expected call of SaveAuthorizationRequestFingerprint.
type MockTokenCacheReadWriter ¶
type MockTokenCacheReadWriter struct {
// contains filtered or unexported fields
}
MockTokenCacheReadWriter is a mock of TokenCacheReadWriter interface.
func NewMockTokenCacheReadWriter ¶
func NewMockTokenCacheReadWriter(ctrl *gomock.Controller) *MockTokenCacheReadWriter
NewMockTokenCacheReadWriter creates a new mock instance.
func (*MockTokenCacheReadWriter) EXPECT ¶
func (m *MockTokenCacheReadWriter) EXPECT() *MockTokenCacheReadWriterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTokenCacheReadWriter) ReadAuthorizationRequestFingerprint ¶
func (m *MockTokenCacheReadWriter) ReadAuthorizationRequestFingerprint(ctx context.Context, clientID typedef.ClientID, authCode string) (*typedef.AuthorizationRequestFingerprint, error)
ReadAuthorizationRequestFingerprint mocks base method.
type MockTokenCacheReadWriterMockRecorder ¶
type MockTokenCacheReadWriterMockRecorder struct {
// contains filtered or unexported fields
}
MockTokenCacheReadWriterMockRecorder is the mock recorder for MockTokenCacheReadWriter.
func (*MockTokenCacheReadWriterMockRecorder) ReadAuthorizationRequestFingerprint ¶
func (mr *MockTokenCacheReadWriterMockRecorder) ReadAuthorizationRequestFingerprint(ctx, clientID, authCode any) *gomock.Call
ReadAuthorizationRequestFingerprint indicates an expected call of ReadAuthorizationRequestFingerprint.
func (*MockTokenCacheReadWriterMockRecorder) WriteRefreshToken ¶
func (mr *MockTokenCacheReadWriterMockRecorder) WriteRefreshToken(ctx, token, clientID, userID any) *gomock.Call
WriteRefreshToken indicates an expected call of WriteRefreshToken.
type MockUserIDExtractor ¶
type MockUserIDExtractor struct {
// contains filtered or unexported fields
}
MockUserIDExtractor is a mock of UserIDExtractor interface.
func NewMockUserIDExtractor ¶
func NewMockUserIDExtractor(ctrl *gomock.Controller) *MockUserIDExtractor
NewMockUserIDExtractor creates a new mock instance.
func (*MockUserIDExtractor) EXPECT ¶
func (m *MockUserIDExtractor) EXPECT() *MockUserIDExtractorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockUserIDExtractor) ExtractUserID ¶
func (m *MockUserIDExtractor) ExtractUserID(refreshToken string) (typedef.UserID, error)
ExtractUserID mocks base method.
type MockUserIDExtractorMockRecorder ¶
type MockUserIDExtractorMockRecorder struct {
// contains filtered or unexported fields
}
MockUserIDExtractorMockRecorder is the mock recorder for MockUserIDExtractor.
func (*MockUserIDExtractorMockRecorder) ExtractUserID ¶
func (mr *MockUserIDExtractorMockRecorder) ExtractUserID(refreshToken any) *gomock.Call
ExtractUserID indicates an expected call of ExtractUserID.
type MockUserInfoReader ¶
type MockUserInfoReader struct {
// contains filtered or unexported fields
}
MockUserInfoReader is a mock of UserInfoReader interface.
func NewMockUserInfoReader ¶
func NewMockUserInfoReader(ctrl *gomock.Controller) *MockUserInfoReader
NewMockUserInfoReader creates a new mock instance.
func (*MockUserInfoReader) EXPECT ¶
func (m *MockUserInfoReader) EXPECT() *MockUserInfoReaderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockUserInfoReader) ReadUserInfo ¶
func (m *MockUserInfoReader) ReadUserInfo(ctx context.Context, accessToken jwt.Token) (*entity.UserInfo, error)
ReadUserInfo mocks base method.
type MockUserInfoReaderMockRecorder ¶
type MockUserInfoReaderMockRecorder struct {
// contains filtered or unexported fields
}
MockUserInfoReaderMockRecorder is the mock recorder for MockUserInfoReader.
func (*MockUserInfoReaderMockRecorder) ReadUserInfo ¶
func (mr *MockUserInfoReaderMockRecorder) ReadUserInfo(ctx, accessToken any) *gomock.Call
ReadUserInfo indicates an expected call of ReadUserInfo.
type MockUserRegisterer ¶
type MockUserRegisterer struct {
// contains filtered or unexported fields
}
MockUserRegisterer is a mock of UserRegisterer interface.
func NewMockUserRegisterer ¶
func NewMockUserRegisterer(ctrl *gomock.Controller) *MockUserRegisterer
NewMockUserRegisterer creates a new mock instance.
func (*MockUserRegisterer) EXPECT ¶
func (m *MockUserRegisterer) EXPECT() *MockUserRegistererMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockUserRegisterer) RegisterUser ¶
func (m *MockUserRegisterer) RegisterUser(ctx context.Context, name, pw string) (*entity.User, error)
RegisterUser mocks base method.
type MockUserRegistererMockRecorder ¶
type MockUserRegistererMockRecorder struct {
// contains filtered or unexported fields
}
MockUserRegistererMockRecorder is the mock recorder for MockUserRegisterer.
func (*MockUserRegistererMockRecorder) RegisterUser ¶
func (mr *MockUserRegistererMockRecorder) RegisterUser(ctx, name, pw any) *gomock.Call
RegisterUser indicates an expected call of RegisterUser.
type PasswordVerifier ¶
type RefreshTokenGrantAcceptor ¶
type RefreshTokenGrantAcceptor interface { RefreshTokenVerifier UserIDExtractor iface.AccessTokenGenerator iface.RefreshTokenGenerator }
type RefreshTokenVerifier ¶
type RegisterJSONBody ¶
type RegisterJSONBody struct { Name string `json:"name" validate:"required"` Password string `json:"password" validate:"required"` }
RegisterJSONBody defines parameters for Register.
type RegisterJSONRequestBody ¶
type RegisterJSONRequestBody RegisterJSONBody
RegisterJSONRequestBody defines body for Register for application/json ContentType.
type Registration ¶
type Registration struct {
// contains filtered or unexported fields
}
func (*Registration) ServeHTTP ¶
func (rr *Registration) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RequestFingerprintSaver ¶
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type Response ¶
type Response struct { Status int `json:"status"` Summary xerr.PublicError `json:"summary"` Details []string `json:"details,omitempty"` }
type ResponseTypesSupported ¶
type ResponseTypesSupported string
ResponseTypesSupported defines model for ConfigurationResponse.response_types_supported.
const (
ResponseTypesSupportedCode ResponseTypesSupported = "code"
)
Defines values for ResponseTypesSupported.
type ScopesSupported ¶
type ScopesSupported string
ScopesSupported defines model for ConfigurationResponse.scopes_supported.
const ( Email ScopesSupported = "email" Openid ScopesSupported = "openid" Profile ScopesSupported = "profile" )
Defines values for ScopesSupported.
type SubjectTypesSupported ¶
type SubjectTypesSupported string
SubjectTypesSupported defines model for ConfigurationResponse.subject_types_supported.
const (
Public SubjectTypesSupported = "public"
)
Defines values for SubjectTypesSupported.
type TokenCacheReadWriter ¶
type TokenCacheReadWriter interface { iface.AuthorizationRequestFingerprintReader iface.RefreshTokenWriter }
type TokenEndpointAuthMethodsSupported ¶
type TokenEndpointAuthMethodsSupported string
TokenEndpointAuthMethodsSupported defines model for ConfigurationResponse.token_endpoint_auth_methods_supported.
const (
ClientSecretBasic TokenEndpointAuthMethodsSupported = "client_secret_basic"
)
Defines values for TokenEndpointAuthMethodsSupported.
type TokenErrorResponse ¶
type TokenErrorResponse struct {
Error TokenErrorResponseError `json:"error"`
}
TokenErrorResponse https://openid-foundation-japan.github.io/openid-connect-core-1_0.ja.html#TokenErrorResponse
type TokenErrorResponseError ¶
type TokenErrorResponseError string
TokenErrorResponseError defines model for TokenErrorResponse.Error.
const ( TokenErrorResponseErrorInvalidClient TokenErrorResponseError = "invalid_client" TokenErrorResponseErrorInvalidGrant TokenErrorResponseError = "invalid_grant" TokenErrorResponseErrorInvalidRequest TokenErrorResponseError = "invalid_request" TokenErrorResponseErrorInvalidScope TokenErrorResponseError = "invalid_scope" TokenErrorResponseErrorUnsupportedGrantType TokenErrorResponseError = "unsupported_grant_type" )
Defines values for TokenErrorResponseError.
type TokenFormdataBody ¶
type TokenFormdataBody struct { // Code Represents "code" parameter Code *string `form:"code" json:"code" schema:"code" validate:"omitempty,alphanum"` // GrantType Represents "grant_type" parameter GrantType typedef.GrantType `form:"grant_type" json:"grant_type" schema:"grant_type" validate:"required,grant-type-validator"` // RedirectURI Represents "redirect_uri" parameter RedirectURI *string `form:"redirect_uri" json:"redirect_uri" schema:"redirect_uri" validate:"omitempty,url_encoded"` // RefreshToken Represents "refresh_token" parameter RefreshToken *string `form:"refresh_token" json:"refresh_token" schema:"refresh_token" validate:"omitempty,jwt"` }
TokenFormdataBody defines parameters for Token.
type TokenFormdataRequestBody ¶
type TokenFormdataRequestBody TokenFormdataBody
TokenFormdataRequestBody defines body for Token for application/x-www-form-urlencoded ContentType.
type TokenParams ¶
type TokenParams struct { // Sid Session ID Sid *SessionId `form:"sid,omitempty" json:"-" url:"sid"` }
TokenParams defines parameters for Token.
type TokenResponse ¶
type TokenResponse struct { AccessToken string `json:"access_token"` ExpiresIn uint64 `json:"expires_in"` IDToken *string `json:"id_token,omitempty"` RefreshToken string `json:"refresh_token"` TokenType typedef.TokenType `json:"token_type"` }
TokenResponse ...
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UILocalesSupported ¶
type UILocalesSupported string
UILocalesSupported defines model for ConfigurationResponse.ui_locales_supported.
const (
JaJP UILocalesSupported = "ja-JP"
)
Defines values for UILocalesSupported.
type UnauthorizedRequest ¶
type UnauthorizedRequest = ErrorResponse
UnauthorizedRequest Represents error response
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type User ¶
type User struct { ID typedef.UserID `json:"id" validate:"required"` Name string `json:"name" validate:"required"` }
User defines model for User.
type UserIDExtractor ¶
type UserInfoReader ¶
type UserInfoResponse ¶
type UserInfoResponse struct { Name *string `json:"name,omitempty"` Sub *uint64 `json:"sub,omitempty"` }
UserInfoResponse Represents user information
type UserName ¶
type UserName struct {
Name string `json:"name" validate:"required"`
}
UserName Represents a part of user data.
type UserPassword ¶
type UserPassword struct {
Password string `json:"password" validate:"required"`
}
UserPassword Represents the password of user