middleware

package
v0.0.0-...-1305305 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	// contains filtered or unexported fields
}

func CreateAuthentication

func CreateAuthentication(dbClient *database.MongoClient, dbName string, collName string, dbTimeout time.Duration) Authentication

func (Authentication) AuthenticateUser

func (auth Authentication) AuthenticateUser(next http.Handler) http.Handler

type Authorization

type Authorization struct {
	// contains filtered or unexported fields
}

func CreateAuthorization

func CreateAuthorization(dbClient *database.MongoClient, dbName string, userCollName string, permissionCollName string, dbTimeout time.Duration) Authorization

func (Authorization) AuthorizeParticipantUser

func (auth Authorization) AuthorizeParticipantUser(next http.Handler) http.Handler

func (Authorization) AuthorizeSuperOrParticipantUser

func (auth Authorization) AuthorizeSuperOrParticipantUser(next http.Handler) http.Handler

func (Authorization) AuthorizeSuperUser

func (auth Authorization) AuthorizeSuperUser(next http.Handler) http.Handler

func (Authorization) CheckTOTPPasscode

func (auth Authorization) CheckTOTPPasscode(next http.Handler) http.Handler

type UserClaims

type UserClaims struct {
	Uid   string `json:"uid"`
	Email string `json:"email"`
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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