client

package
v0.0.0-...-99ca00c Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Assertion() (string, error)
	// CreateRequestURI(ctx context.Context, assertion, state string) (*RequestURIResponse, error)
	// AuthenticationURL(ctx context.Context, requestURI string) (string, error)
	// ExchangeCode(ctx context.Context, assertion, authorizationCode, pkceCodeVerifier string) (*oauth2.Token, error)
	PublicKeys(ctx context.Context) (*jose.JSONWebKeySet, uint64, error)
	ClientID() string
	Audience() string
	ServerMetadata() *discoveryv1.ServerMetadata
	Issuer() string
	Introspect(ctx context.Context, assertion, token string) (*tokenv1.Token, error)
	ClientCredentials(ctx context.Context, assertion string) (*oauth2.Token, error)
}

Client describes OIDC client contract.

func HTTP

func HTTP(ctx context.Context, issuer string, opts *Options) (Client, error)

HTTP creates an HTTP OIDC Client.

type Options

type Options struct {
	Audience    string
	ClientID    string
	RedirectURI string
	Scopes      []string
	JWK         []byte
}

Options defines client options

type RequestURIResponse

type RequestURIResponse struct {
	Issuer       string `json:"iss"`
	RequestURI   string `json:"request_uri"`
	CodeVerifier string `json:"code_verifier"`
	Nonce        string `json:"nonce"`
}

RequestURIResponse contains all request_uri creation related information.

Jump to

Keyboard shortcuts

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