oidc

package
v0.3.84-rc-388addc Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientCredentialsDetails

type ClientCredentialsDetails struct {
	ProviderUrl  string
	ClientId     string
	ClientSecret string
	Scopes       []string
}

type ClientPasswordDetails

type ClientPasswordDetails struct {
	ProviderUrl string
	ClientId    string
	Scopes      []string
	Username    string
	Password    string
}

type DeviceDetails

type DeviceDetails struct {
	ProviderUrl string
	ClientId    string
	Scopes      []string
}

type FunctionTokenSource

type FunctionTokenSource struct {
	GetToken func() (*oauth2.Token, error)
}

func (*FunctionTokenSource) Token

func (f *FunctionTokenSource) Token() (*oauth2.Token, error)

type KubernetesDetails

type KubernetesDetails struct {
	ProviderUrl string
	ClientId    string
	Scopes      []string
}

type PKCEDetails

type PKCEDetails struct {
	ProviderUrl string
	ClientId    string
	LocalPort   uint16
	Scopes      []string
}

type TokenCredentials

type TokenCredentials struct {
	TokenSource oauth2.TokenSource
}

func AuthenticateDevice

func AuthenticateDevice(config DeviceDetails) (*TokenCredentials, error)

func AuthenticateKubernetes

func AuthenticateKubernetes(config KubernetesDetails) (*TokenCredentials, error)

func AuthenticatePkce

func AuthenticatePkce(config PKCEDetails) (*TokenCredentials, error)

func AuthenticateWithClientCredentials

func AuthenticateWithClientCredentials(config ClientCredentialsDetails) (*TokenCredentials, error)

func AuthenticateWithPassword

func AuthenticateWithPassword(config ClientPasswordDetails) (*TokenCredentials, error)

func (*TokenCredentials) GetRequestMetadata

func (c *TokenCredentials) GetRequestMetadata(context.Context, ...string) (map[string]string, error)

func (*TokenCredentials) RequireTransportSecurity

func (c *TokenCredentials) RequireTransportSecurity() bool

Jump to

Keyboard shortcuts

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