auth

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: AGPL-3.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllowExpiredCert

func GetAllowExpiredCert() bool

func RoleHandler

func RoleHandler(minRole rbac.Role, f func(p periHttp.PeriHttp)) http.Handler

func SetAllowExpiredCert

func SetAllowExpiredCert(allow bool)

func SetAuthMethod

func SetAuthMethod(method AuthMethod)

func SetCheckCert

func SetCheckCert(caCerts *x509.CertPool)

func VerifyCertificates

func VerifyCertificates(clientCertificates []*x509.Certificate) (role rbac.Role, err error)

func VerifyCertificatesWithoutRole

func VerifyCertificatesWithoutRole(clientCertificates []*x509.Certificate) (err error)

Types

type AuthMethod

type AuthMethod string
const (
	NONE    AuthMethod = "NONE"
	API_KEY AuthMethod = "API_KEY"
	MTLS    AuthMethod = "mTLS"
)

func GetAuthMethod

func GetAuthMethod() AuthMethod

Jump to

Keyboard shortcuts

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