authz

package
v0.0.0-...-afa1830 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelCookies

func DelCookies(ctx echo.Context, names ...string)

func IsAMachine

func IsAMachine(ac oidc.AccessClaims) bool

IsAMachine return the reverse of IsNotAMachine function

func IsNotAMachine

func IsNotAMachine(ac oidc.AccessClaims) bool

IsAMachine return true if the received claims correspond to a machine claims a machine authenticates itself as an sso client id using client_credentials so it checks if the subject equals the client to estimate it

func NewTokenIntrospector

func NewTokenIntrospector(
	mode, selfCliID string, selfCliOnly bool,
	tokenRepo interface{}, ssoDB *sql.DB, redConn *redis.Client,
) echo.MiddlewareFunc

NewTokenIntrospector is a middleware used to declare than a route require authorization. The opaque token is found, instropected and information are set inside the current request context to be checked later by different actors (modules...) the way of retrieval, checks... of bearer tokens are defined by the given token repo

func SetCookie

func SetCookie(ctx echo.Context, name, value string, duration time.Time)

Types

This section is empty.

Jump to

Keyboard shortcuts

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