Documentation ¶
Index ¶
- Constants
- Variables
- func NewOIDC(auth *Auth) echo.MiddlewareFunc
- func OapiValidator(spec *openapi3.T, opts ...ValidatorOption) echo.MiddlewareFunc
- func SlogRequestID() echo.MiddlewareFunc
- type Auth
- type Claims
- type Config
- type Validator
- type ValidatorOption
- func BasicAuth(fn middleware.BasicAuthValidator) ValidatorOption
- func BasicAuthWithConfig(config middleware.BasicAuthConfig) ValidatorOption
- func ErrorHandler(fn oapimw.ErrorHandler) ValidatorOption
- func JWTAuth(signingKey any) ValidatorOption
- func JWTAuthWithConfig(config echojwt.Config) ValidatorOption
- func KeyAuth(fn middleware.KeyAuthValidator) ValidatorOption
- func KeyAuthWithConfig(config middleware.KeyAuthConfig) ValidatorOption
- func MultiError() ValidatorOption
- func MultiErrorHandler(fn oapimw.MultiErrorHandler) ValidatorOption
- func OpenIDConnect(auth *Auth) ValidatorOption
- func WithSkipperFunc(skipFn middleware.Skipper) ValidatorOption
Constants ¶
View Source
const ( OauthCookieState = "oauth_state" OauthCookieNonce = "oauth_nonce" OauthCookieAccessToken = "oauth_access_token" OauthCookieRefreshToken = "oauth_refresh_token" OauthRefreshTokenTimeout = 30 * 24 * time.Hour )
Variables ¶
View Source
var UserClaims = "oidcClaims"
Functions ¶
func OapiValidator ¶
func OapiValidator(spec *openapi3.T, opts ...ValidatorOption) echo.MiddlewareFunc
func SlogRequestID ¶
func SlogRequestID() echo.MiddlewareFunc
Types ¶
type Auth ¶
type Auth struct { Provider *oidc.Provider Verifier *oidc.IDTokenVerifier OAuthConfig *oauth2.Config }
func (*Auth) CallbackHandler ¶
func (*Auth) LogoutHandler ¶
func (*Auth) RedirectHandler ¶
func (*Auth) RefreshHandler ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func (*Validator) AuthenticatorFunc ¶
func (v *Validator) AuthenticatorFunc() openapi3filter.AuthenticationFunc
type ValidatorOption ¶
type ValidatorOption func(*Validator)
func BasicAuth ¶
func BasicAuth(fn middleware.BasicAuthValidator) ValidatorOption
func BasicAuthWithConfig ¶
func BasicAuthWithConfig(config middleware.BasicAuthConfig) ValidatorOption
func ErrorHandler ¶
func ErrorHandler(fn oapimw.ErrorHandler) ValidatorOption
func JWTAuth ¶
func JWTAuth(signingKey any) ValidatorOption
func JWTAuthWithConfig ¶
func JWTAuthWithConfig(config echojwt.Config) ValidatorOption
func KeyAuth ¶
func KeyAuth(fn middleware.KeyAuthValidator) ValidatorOption
func KeyAuthWithConfig ¶
func KeyAuthWithConfig(config middleware.KeyAuthConfig) ValidatorOption
func MultiError ¶
func MultiError() ValidatorOption
func MultiErrorHandler ¶
func MultiErrorHandler(fn oapimw.MultiErrorHandler) ValidatorOption
func OpenIDConnect ¶
func OpenIDConnect(auth *Auth) ValidatorOption
func WithSkipperFunc ¶
func WithSkipperFunc(skipFn middleware.Skipper) ValidatorOption
Click to show internal directories.
Click to hide internal directories.