Documentation
¶
Overview ¶
Package auth contains the authentication module which is responsible for authenticating and authorizing users on the endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
Logger logger.ILogger
Config config.Config
Settings models.Settings
Prompter userio.Prompter
}
Auth is the main struct for the auth module
type AuthModuleBuilder ¶
type AuthModuleBuilder struct {
Logger logger.ILogger
Config config.Config
Settings models.Settings
Prompter userio.Prompter
}
AuthModuleBuilder is the builder for the auth module
func NewBuilder ¶
func NewBuilder(config config.Config, settings models.Settings) *AuthModuleBuilder
NewBuilder creates a new AuthModuleBuilder
type IHttpAuth ¶
type IHttpAuth interface {
// AllowRoles middleware checks if the given request has a valid JWT token
// and if the user has any of the given roles.
AllowRoles(next http.Handler, roles ...string) http.Handler
// AllowAuthenticated middleware checks if the given request has a valid JWT token.
AllowAuthenticated(next http.Handler) http.Handler
}
IHttpAuth is an interface for the HTTP authentication
Directories
¶
| Path | Synopsis |
|---|---|
|
Package middlewares provides a set of middleware functions used to check Zitadel access token for auth and roles.
|
Package middlewares provides a set of middleware functions used to check Zitadel access token for auth and roles. |
Click to show internal directories.
Click to hide internal directories.