jwt

package
v2.2.105 Latest Latest
Warning

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

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

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