Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 SetAuthorizationHeaderInCtx ¶ added in v0.4.22
func SetAuthorizationHeaderInCtx() echo.MiddlewareFunc
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.