jwt

package
v2.2.108 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJwk

func GetJwk(ctx context.Context, url string, httpClient *http.Client) (jwk.Set, error)

Types

type JwtStruct

type JwtStruct struct {
	UserName       string        `json:"user_name"`
	Uxid           string        `json:"uxid"`
	SessionID      string        `json:"sessionId"`
	CustomerNumber string        `json:"customerNumber"`
	Locale         string        `json:"locale"`
	DeviceID       string        `json:"deviceId"`
	Authorities    []interface{} `json:"authorities"`
	ClientID       string        `json:"client_id"`
	Site           string        `json:"site"`
	Scope          []interface{} `json:"scope"`
	GrantType      string        `json:"grant_type"`
}

type MockService added in v2.2.67

type MockService struct {
	Jwt JwtStruct
}

func (*MockService) GetJwtToken added in v2.2.67

func (m *MockService) GetJwtToken(authHeader string) (*JwtStruct, error)

func (*MockService) GetJwtTokenFromRequest added in v2.2.67

func (m *MockService) GetJwtTokenFromRequest(req *http.Request) (*JwtStruct, error)

type Service added in v2.2.66

type Service interface {
	GetJwtToken(authHeader string) (*JwtStruct, error)
	GetJwtTokenFromRequest(req *http.Request) (*JwtStruct, error)
}

func NewJwtService

func NewJwtService(jwkResourceUrl string, clock clock.Clock) (Service, error)

Jump to

Keyboard shortcuts

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