wire

package
v0.25.3-rc4 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ClientID            string   `json:"clientId,omitempty"`
	SignatureAlgorithms []string `json:"signatureAlgorithms,omitempty"`

	// the properties below are only used for testing
	SkipClientIDCheck          bool             `json:"-"`
	SkipExpiryCheck            bool             `json:"-"`
	SkipIssuerCheck            bool             `json:"-"`
	InsecureSkipSignatureCheck bool             `json:"-"`
	Now                        func() time.Time `json:"-"`
}

type DPOPOptions

type DPOPOptions struct {
	// Public part of the  signing key for DPoP access token in PEM format
	SigningKey []byte `json:"key"`
	// URI template for the URI the ACME client must call to fetch the DPoP challenge proof (an access token from wire-server)
	Target string `json:"target"`
	// contains filtered or unexported fields
}

func (*DPOPOptions) EvaluateTarget

func (o *DPOPOptions) EvaluateTarget(deviceID string) (string, error)

func (*DPOPOptions) GetSigningKey

func (o *DPOPOptions) GetSigningKey() crypto.PublicKey

type OIDCOptions

type OIDCOptions struct {
	Provider          *Provider `json:"provider,omitempty"`
	Config            *Config   `json:"config,omitempty"`
	TransformTemplate string    `json:"transform,omitempty"`
	// contains filtered or unexported fields
}

func (*OIDCOptions) EvaluateTarget

func (o *OIDCOptions) EvaluateTarget(deviceID string) (string, error)

func (*OIDCOptions) GetConfig

func (o *OIDCOptions) GetConfig() *oidc.Config

func (*OIDCOptions) GetProvider

func (o *OIDCOptions) GetProvider(ctx context.Context) *oidc.Provider

func (*OIDCOptions) Transform

func (o *OIDCOptions) Transform(v map[string]any) (map[string]any, error)

type Options

type Options struct {
	OIDC *OIDCOptions `json:"oidc,omitempty"`
	DPOP *DPOPOptions `json:"dpop,omitempty"`
}

Options holds the Wire ACME extension options

func (*Options) GetDPOPOptions

func (o *Options) GetDPOPOptions() *DPOPOptions

GetDPOPOptions returns the DPoP options.

func (*Options) GetOIDCOptions

func (o *Options) GetOIDCOptions() *OIDCOptions

GetOIDCOptions returns the OIDC options.

func (*Options) Validate

func (o *Options) Validate() error

Validate validates and initializes the Wire OIDC and DPoP options.

TODO(hs): find a good way to perform this only once.

type Provider

type Provider struct {
	IssuerURL   string   `json:"issuer,omitempty"`
	AuthURL     string   `json:"authorization_endpoint,omitempty"`
	TokenURL    string   `json:"token_endpoint,omitempty"`
	JWKSURL     string   `json:"jwks_uri,omitempty"`
	UserInfoURL string   `json:"userinfo_endpoint,omitempty"`
	Algorithms  []string `json:"id_token_signing_alg_values_supported,omitempty"`
}

Jump to

Keyboard shortcuts

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