auth

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidToken    = errors.New("invalid token")
	ErrInvalidAuthType = errors.New("invalid authorization type")
)

Functions

func CompareTokenStrings added in v1.0.0

func CompareTokenStrings(token1 string, token2 string) int

func CompareTokens

func CompareTokens(token1 []byte, token2 []byte) int

func ExtractTokenFromHeader added in v1.0.0

func ExtractTokenFromHeader(header string, authType AuthType) (string, error)

func ParseTokenFromHeader

func ParseTokenFromHeader(header string, authType AuthType) ([]byte, error)

Types

type AuthType

type AuthType string
const (
	AuthTypeBasic  AuthType = "basic"
	AuthTypeBearer AuthType = "bearer"
)

Jump to

Keyboard shortcuts

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