authentication

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ContextKeyAccountID string = "account-id"

ContextKeyAccountID is the key used to retrieve and save accountId into the context

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountAuthenticator

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

AccountAuthenticator structure responsible for handling request authentication

func NewAccountAuthenticator

func NewAccountAuthenticator(logger logger, jwks jwksClient) AccountAuthenticator

NewAccountAuthenticator creates a new instance of the UserAuthenticator structure

func (AccountAuthenticator) Authenticate

func (ua AccountAuthenticator) Authenticate(ctx *routing.Context) error

Authenticate is responsible for verify if the request is authenticated

It tries to authenticate the token with the certifications on memory, if it fails, the certifications are renewed and the authentication is run again.

Jump to

Keyboard shortcuts

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