idputil

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package idputil provides utilities for working with identity providers. It's used in the internal code and not exposed to the public API.

Index

Constants

View Source
const (
	DefaultHTTPRequestTimeout          = 30 * time.Second
	DefaultHTTPRequestMaxRetryAttempts = 3
)

Variables

This section is empty.

Functions

func MakeDefaultHTTPClient added in v0.4.0

func MakeDefaultHTTPClient(reqTimeout time.Duration, logger log.FieldLogger) *http.Client

func PrepareLogger added in v0.4.0

func PrepareLogger(logger log.FieldLogger) log.FieldLogger

Types

type OpenIDConfiguration

type OpenIDConfiguration struct {
	TokenURL              string `json:"token_endpoint"`
	IntrospectionEndpoint string `json:"introspection_endpoint"`
	JWKSURI               string `json:"jwks_uri"`
}

func GetOpenIDConfiguration

func GetOpenIDConfiguration(
	ctx context.Context,
	httpClient *http.Client,
	targetURL string,
	additionalHeaders map[string]string,
	logger log.FieldLogger,
	promMetrics *metrics.PrometheusMetrics,
) (OpenIDConfiguration, error)

type TrustedIssuerStore

type TrustedIssuerStore struct {
	// contains filtered or unexported fields
}

func NewTrustedIssuerStore

func NewTrustedIssuerStore() *TrustedIssuerStore

func (*TrustedIssuerStore) AddTrustedIssuer

func (s *TrustedIssuerStore) AddTrustedIssuer(issName, issURL string)

func (*TrustedIssuerStore) AddTrustedIssuerURL

func (s *TrustedIssuerStore) AddTrustedIssuerURL(issURL string) error

func (*TrustedIssuerStore) GetURLForIssuer

func (s *TrustedIssuerStore) GetURLForIssuer(issuer string) (string, bool)

type TrustedIssuerURLMatcher

type TrustedIssuerURLMatcher func(issURL *url.URL) bool

Jump to

Keyboard shortcuts

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