common

package
v0.0.0-...-f2ba1b1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CacheExpiry = 60
View Source
const TYPE_CODE = "authorization_code"
View Source
const TYPE_VP_TOKEN = "vp_token"

Variables

View Source
var GlobalCache = initCache()

Functions

func BuildUrlString

func BuildUrlString(address string, path string) string

func ResetGlobalCache

func ResetGlobalCache()

Types

type AllCaches

type AllCaches struct {
	ServiceCache Cache
	TirEndpoints Cache
	IssuersCache Cache
	IssuerCache  Cache
}

type Cache

type Cache interface {
	Add(k string, x interface{}, d time.Duration) error
	Get(k string) (interface{}, bool)
	Delete(k string)
}

type Clock

type Clock interface {
	Now() time.Time
}

type JwtTokenSigner

type JwtTokenSigner struct{}

func (JwtTokenSigner) Sign

func (JwtTokenSigner) Sign(t jwt.Token, alg jwa.SignatureAlgorithm, key interface{}, options ...jwt.SignOption) ([]byte, error)

type OpenIDProviderMetadata

type OpenIDProviderMetadata struct {
	Issuer                                 string   `json:"issuer"`
	AuthorizationEndpoint                  string   `json:"authorization_endpoint"`
	TokenEndpoint                          string   `json:"token_endpoint"`
	PresentationDefinitionEndpoint         string   `json:"presentation_definition_endpoint,omitempty"`
	JwksUri                                string   `json:"jwks_uri"`
	ScopesSupported                        []string `json:"scopes_supported"`
	ResponseTypesSupported                 []string `json:"response_types_supported"`
	ResponseModeSupported                  []string `json:"response_mode_supported,omitempty"`
	GrantTypesSupported                    []string `json:"grant_types_supported,omitempty"`
	SubjectTypesSupported                  []string `json:"subject_types_supported"`
	IdTokenSigningAlgValuesSupported       []string `json:"id_token_signing_alg_values_supported"`
	RequestObjectSigningAlgValuesSupported []string `json:"request_object_signing_alg_values_supported,omitempty"`
	RequestParameterSupported              bool     `json:"request_parameter_supported,omitempty"`
	TokenEndpointAuthMethodsSupported      []string `json:"token_endpoint_auth_methods_supported,omitempty"`
}

type RealClock

type RealClock struct{}

func (RealClock) Now

func (RealClock) Now() time.Time

type TokenSigner

type TokenSigner interface {
	Sign(t jwt.Token, alg jwa.SignatureAlgorithm, key interface{}, options ...jwt.SignOption) ([]byte, error)
}

Jump to

Keyboard shortcuts

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