jwtmodels

package
v0.12.5 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 2 Imported by: 15

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, userContext supertokens.UserContext) (GetJWKSAPIResponse, 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 GetJWKSAPIResponse added in v0.7.0

type GetJWKSAPIResponse struct {
	OK *struct {
		Keys []JsonWebKeys
	}
	GeneralError *supertokens.GeneralErrorResponse
}

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, useStaticSigningKey *bool, userContext supertokens.UserContext) (CreateJWTResponse, error)
	GetJWKS   *func(userContext supertokens.UserContext) (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