provider

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActiveProviderNames

func GetActiveProviderNames() (names []string)

GetActiveProviderNames returns a list of the names of the providers that are not disabled

func GetProviderNames

func GetProviderNames() []string

GetProviderNames returns a slice of all the configured provider names

func Init

func Init(providerNames []string)

Init initializes the provider db

Types

type ClientConfig

type ClientConfig struct {
	Name                                 string
	Issuer                               string
	Endpoints                            oidc.Endpoints
	ClientCredentials                    ClientCredentials
	DeviceClientCredentials              ClientCredentials
	IntrospectionClientCredentials       ClientCredentials
	RedirectURL                          string
	Scopes                               []string
	ProviderMetaData                     oidc.ProviderMetaData
	UpdatedAt                            time.Time
	ManuallyConfiguredDeviceAuthEndpoint string
	Disabled                             bool
	AuthCodeDisabled                     bool
	DeviceDisabled                       bool
}

ClientConfig represents the configuration of an OIDC client.

func GetAllClientConfigs

func GetAllClientConfigs() ([]*ClientConfig, error)

GetAllClientConfigs returns all cached ClientConfigs or an error.

func GetClientConfig

func GetClientConfig(key string) (*ClientConfig, error)

GetClientConfig returns the ClientConfig for a given key from the cache or an error.

func GetClientConfigs

func GetClientConfigs(keys []string) ([]*ClientConfig, error)

GetClientConfigs returns a slice of ClientConfigs for the given keys from the cache or an error.

func (*ClientConfig) MarshalBinary

func (c *ClientConfig) MarshalBinary() ([]byte, error)

MarshalBinary marshals ClientConfig into bytes.

func (*ClientConfig) UnmarshalBinary

func (c *ClientConfig) UnmarshalBinary(data []byte) error

UnmarshalBinary unmarshalls bytes into ClientConfig.

type ClientCredentials

type ClientCredentials struct {
	ClientID     string
	ClientSecret sstring.SensitiveString
}

ClientCredentials are credentials for a client

func (*ClientCredentials) CopyIfNotSet

func (cc *ClientCredentials) CopyIfNotSet(cpy ClientCredentials)

CopyIfNotSet copies the client credentials from the passed struct to this struct if not already set.

func (*ClientCredentials) Valid

func (cc *ClientCredentials) Valid() bool

Valid checks if ClientCredentials set

Jump to

Keyboard shortcuts

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