Documentation ¶
Index ¶
Constants ¶
const AuthorizationTokenKey = "Authorization"
AuthorizationTokenKey - if the user use an authorization, this is the key of this element in the Header
const UIDParameterKey = "PublisherID"
UIDParameterKey - use this value to get the user PublisherID store in the context parameters
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTMiddleware ¶
JWTMiddleware Middleware struct that contains a *auth.Client that is used to check if the JWT token // present in the header are valid Token. This middleware is use only if the server used firebase to // authentificate user
func (JWTMiddleware) CheckToken ¶
func (auth JWTMiddleware) CheckToken(idToken string) (*auth.Token, error)
CheckToken - verify ID Token. If the token is valid it return a auth.Token else it return an themisError
func (JWTMiddleware) FirebaseAuthenticationMiddleware ¶
func (auth JWTMiddleware) FirebaseAuthenticationMiddleware(ctx iris.Context)
FirebaseAuthenticationMiddleware middleware used to check the firebase token
type JWTMiddlewareProtocol ¶
type JWTMiddlewareProtocol interface {
FirebaseAuthenticationMiddleware(ctx iris.Context)
}
ThemisJWTMiddlewareProtocol - jwt middleware protocol