middleware

package
v0.0.0-...-0f828a4 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthRequired

func AuthRequired() gin.HandlerFunc

A middleware that responds with http.StatusForbidden when no valid bearer was supplied.

func AuthorizationHeaderParser

func AuthorizationHeaderParser(userRepo repositories.UserRepository) gin.HandlerFunc

A middleware that parses the 'Authorization' header field using a bearer token. In this case, the bearer token can be either the JWT or a

func GameServerAccessOnly

func GameServerAccessOnly() gin.HandlerFunc

Checks if the game server access token was set as a header field. Returns a forbidden response when this is not the case.

Types

This section is empty.

Jump to

Keyboard shortcuts

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