auth

package
v1.6.28 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JwtProvider

type JwtProvider struct {
	Username string `json:"username"`
	jwt.StandardClaims
}

JwtProvider is the representation of decoded JWT

func CheckToken

func CheckToken(security *SecurityAPI, w http.ResponseWriter, r *http.Request) (*JwtProvider, error)

CheckToken will return if token is valid or not

type SecurityAPI

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

SecurityAPI object contains informations related to the endpoints

func InitializeSecurity

func InitializeSecurity(configuration configurationtypes.AbstractConfigurationInterface) *SecurityAPI

InitializeSecurity initialize the security endpoints

func (*SecurityAPI) GetBasePath

func (s *SecurityAPI) GetBasePath() string

GetBasePath will return the basepath for this resource

func (*SecurityAPI) HandleRequest

func (s *SecurityAPI) HandleRequest(w http.ResponseWriter, r *http.Request)

HandleRequest will handle the request

func (*SecurityAPI) IsEnabled

func (s *SecurityAPI) IsEnabled() bool

IsEnabled will return enabled status

Jump to

Keyboard shortcuts

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