auth

package
v0.0.0-...-c3677c5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTAuthenticator

type JWTAuthenticator struct {
	Key      []byte
	Audience string
}

JWTAuthenticator authenticates using JWT

func (*JWTAuthenticator) GenerateToken

func (a *JWTAuthenticator) GenerateToken(ttl time.Duration) (string, error)

GenerateToken token

func (*JWTAuthenticator) VerifyToken

func (a *JWTAuthenticator) VerifyToken(token string) (int64, error)

VerifyToken verifes a token

Jump to

Keyboard shortcuts

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