auth

package
v0.0.0-...-6d6aeb1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ContextKey  = contextKey("key")
	ContextHost = contextKey("host")
	ReadonlyKey = contextKey("readonly")
)

ContextKey for public key

View Source
var TokenAuth *jwtauth.JWTAuth

TokenAuth is a global authenticator interface

Functions

func ExpireInHours

func ExpireInHours(hours int) int64

ExpireInHours for jwt

func HostContext

func HostContext(next http.Handler) http.Handler

HostContext ...

func Init

func Init()

Init auth

func NotReadOnlyContext

func NotReadOnlyContext(next http.Handler) http.Handler

NotReadOnlyContext makes sure its not a "readonly" JWT

func PubKeyContext

func PubKeyContext(next http.Handler) http.Handler

PubKeyContext parses JWT fields

func Verifier

func Verifier(ja *jwtauth.JWTAuth) func(http.Handler) http.Handler

Verifier ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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