Documentation ¶
Index ¶
- Constants
- func Auth0HandlerCallback(auth *Authenticator) gin.HandlerFunc
- func Auth0HandlerLogin(auth *Authenticator) gin.HandlerFunc
- func Auth0HandlerLogout(ctx *gin.Context)
- func Auth0IsAuthenticated(ctx *gin.Context)
- func Auth0Middleware(ctx *gin.Context)
- func Auth0UserProfileHandler(ctx *gin.Context)
- type AuthHandler
- type Authenticator
- type Claims
- type JWTOutput
- type Port
- type Server
Constants ¶
View Source
const ( InstanceGorillaMux int = iota InstanceGin )
Variables ¶
This section is empty.
Functions ¶
func Auth0HandlerCallback ¶
func Auth0HandlerCallback(auth *Authenticator) gin.HandlerFunc
Handler for our callback.
func Auth0HandlerLogin ¶
func Auth0HandlerLogin(auth *Authenticator) gin.HandlerFunc
Handler for our login.
func Auth0IsAuthenticated ¶
Auth0 IsAuthenticated Middleware IsAuthenticated is a middleware that checks if the user has already been authenticated previously.
func Auth0Middleware ¶
func Auth0UserProfileHandler ¶
Handler for our logged-in user page.
Types ¶
type AuthHandler ¶
type AuthHandler struct{}
type Authenticator ¶
Authenticator is used to authenticate our users.
func NewAuthenticator ¶
func NewAuthenticator() (*Authenticator, error)
New instantiates the *Authenticator.
func (*Authenticator) VerifyIDToken ¶
func (a *Authenticator) VerifyIDToken(ctx context.Context, token *oauth2.Token) (*oidc.IDToken, error)
VerifyIDToken verifies that an *oauth2.Token is a valid *oidc.IDToken.
type Server ¶
type Server interface {
Listen()
}
func NewWebServerFactory ¶
func NewWebServerFactory( instance int, log logger.Logger, dbSQL repository.SQL, dbNoSQL repository.NoSQL, kv repository.KeyValStoreIn, validator validator.Validator, port Port, ctxTimeout time.Duration, ) (Server, error)
Click to show internal directories.
Click to hide internal directories.