Documentation ¶
Index ¶
- func AllowRoles(roles []string) echo.MiddlewareFunc
- func AllowToRoles(roles ...string) echo.MiddlewareFunc
- func AllowUserRoles(roles []string) echo.MiddlewareFunc
- func BasicAuth(username, password string) echo.MiddlewareFunc
- func CheckIfUserIsOfType(userTypes ...string) echo.MiddlewareFunc
- func PropagateTraceFromRequest() echo.MiddlewareFunc
- func SetAuthorizationHeaderInCtx() echo.MiddlewareFunc
- func SetSessionDataInContext() echo.MiddlewareFunc
- func SetUserInfo(withKey string) echo.MiddlewareFunc
- func Trace(next echo.HandlerFunc) echo.HandlerFunc
- type AuthenticationMiddleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowRoles ¶ added in v0.6.2
func AllowRoles(roles []string) echo.MiddlewareFunc
func AllowToRoles ¶ added in v0.5.70
func AllowToRoles(roles ...string) echo.MiddlewareFunc
func AllowUserRoles ¶ added in v0.5.96
func AllowUserRoles(roles []string) echo.MiddlewareFunc
func BasicAuth ¶ added in v0.6.17
func BasicAuth(username, password string) echo.MiddlewareFunc
BasicAuth is a custom middleware for basic authentication.
func CheckIfUserIsOfType ¶ added in v0.4.22
func CheckIfUserIsOfType(userTypes ...string) echo.MiddlewareFunc
CheckIfUserIsOfType checks if the user is of the given type It depends on the user info to be set in the context TODO: eventually, change for https://golangtutorial.dev/tips/golang-slice-contains-method/
func PropagateTraceFromRequest ¶ added in v0.6.13
func PropagateTraceFromRequest() echo.MiddlewareFunc
func SetAuthorizationHeaderInCtx ¶ added in v0.4.22
func SetAuthorizationHeaderInCtx() echo.MiddlewareFunc
func SetSessionDataInContext ¶ added in v0.5.45
func SetSessionDataInContext() echo.MiddlewareFunc
SetSessionDataInContext sets the user in the request context It does not fail or return an error in case the token is not found
func SetUserInfo ¶ added in v0.1.3
func SetUserInfo(withKey string) echo.MiddlewareFunc
Types ¶
type AuthenticationMiddleware ¶
type AuthenticationMiddleware struct {
// contains filtered or unexported fields
}
func NewAuthenticationMiddleware ¶
func NewAuthenticationMiddleware(firebase *firebase.App) *AuthenticationMiddleware
func (*AuthenticationMiddleware) ValidateJWT ¶
func (m *AuthenticationMiddleware) ValidateJWT(ctx context.Context, IDToken string) error
Click to show internal directories.
Click to hide internal directories.