middleware

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AuthorizationTokenKey = "Authorization"

AuthorizationTokenKey - if the user use an authorization, this is the key of this element in the Header

View Source
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

type JWTMiddleware struct {
	FirebaseAuthClient *auth.Client
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL