jwtmodels

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: Apache-2.0 Imports: 1 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIInterface

type APIInterface struct {
	GetJWKSGET *func(options APIOptions) (GetJWKSResponse, error)
}

type APIOptions

type APIOptions struct {
	RecipeImplementation RecipeInterface
	Config               TypeNormalisedInput
	RecipeID             string
	Req                  *http.Request
	Res                  http.ResponseWriter
	OtherHandler         http.HandlerFunc
}

type CreateJWTResponse

type CreateJWTResponse struct {
	OK *struct {
		Jwt string
	}
	UnsupportedAlgorithmError *struct{}
}

type GetJWKSResponse

type GetJWKSResponse struct {
	OK *struct {
		Keys []JsonWebKeys
	}
}

type JsonWebKeys

type JsonWebKeys struct {
	Kty string `json:"kty"`
	Kid string `json:"kid"`
	N   string `json:"n"`
	E   string `json:"e"`
	Alg string `json:"alg"`
	Use string `json:"use"`
}

type OverrideStruct

type OverrideStruct struct {
	Functions func(originalImplementation RecipeInterface) RecipeInterface
	APIs      func(originalImplementation APIInterface) APIInterface
}

type RecipeInterface

type RecipeInterface struct {
	CreateJWT *func(payload map[string]interface{}, validitySeconds *uint64) (CreateJWTResponse, error)
	GetJWKS   *func() (GetJWKSResponse, error)
}

type TypeInput

type TypeInput struct {
	JwtValiditySeconds *uint64
	Override           *OverrideStruct
}

type TypeNormalisedInput

type TypeNormalisedInput struct {
	JwtValiditySeconds uint64
	Override           OverrideStruct
}

Jump to

Keyboard shortcuts

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