jwt

package
v0.0.0-...-cfbb22e Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type CustomClaims

type CustomClaims struct {
	Scope string `json:"scope"`
	jwt.StandardClaims
}

type JSONWebKeys

type JSONWebKeys struct {
	Kty string   `json:"kty"`
	Kid string   `json:"kid"`
	Use string   `json:"use"`
	N   string   `json:"n"`
	E   string   `json:"e"`
	X5c []string `json:"x5c"`
}

type Jwks

type Jwks struct {
	Keys []JSONWebKeys `json:"keys"`
}

type Response

type Response struct {
	Message string `json:"message"`
}

type Service

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

Service provides a Json-Web-Token authentication implementation

func (Service) GenerateToken

func (s Service) GenerateToken(u authapi.User) (string, error)

GenerateToken generates new JWT token and populates it with user data

Jump to

Keyboard shortcuts

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