wire

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 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) GetVerifier

func (o *OIDCOptions) GetVerifier(ctx context.Context) (*oidc.IDTokenVerifier, error)

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 {
	DiscoveryBaseURL string   `json:"discoveryBaseUrl,omitempty"`
	IssuerURL        string   `json:"issuerUrl,omitempty"`
	AuthURL          string   `json:"authorizationUrl,omitempty"`
	TokenURL         string   `json:"tokenUrl,omitempty"`
	JWKSURL          string   `json:"jwksUrl,omitempty"`
	UserInfoURL      string   `json:"userInfoUrl,omitempty"`
	Algorithms       []string `json:"signatureAlgorithms,omitempty"`
}

Jump to

Keyboard shortcuts

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