middleware

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AUTHORIZED_BY_KEY = "AUTHORIZED_BY"
	IS_AUTHORIZED_KEY = "IS_AUTHORIZED"
)

Variables

This section is empty.

Functions

func AddAuthorizationContextMiddlewareAdapter added in v0.0.15

func AddAuthorizationContextMiddlewareAdapter() controllers.Adapter

func ApiKeyAuthorizationMiddlewareAdapter added in v0.0.15

func ApiKeyAuthorizationMiddlewareAdapter(roles []string, claims []string) controllers.Adapter

func EndAuthorizationMiddlewareAdapter

func EndAuthorizationMiddlewareAdapter() controllers.Adapter

EndAuthorizationMiddlewareAdapter This cleans the context of any previous users token left in memory and rereading all of the default options for the next request

func TokenAuthorizationMiddlewareAdapter

func TokenAuthorizationMiddlewareAdapter(roles []string, claims []string) controllers.Adapter

TokenAuthorizationMiddlewareAdapter validates a Authorization Bearer during a rest api call It can take an array of roles and claims to further validate the token in a more granular view, it also can take an OR option in both if the role or claim are coma separated. For example a claim like "_read,_write" will be valid if the user either has a _read claim or a _write claim making them both valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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