credential

package
v0.0.0-...-fb2c256 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0, Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	GetTokenByAuthCode(ctx context.Context) (string, error)
	GetTokenByROPC(ctx context.Context, username, password string) (string, error)
	TokenExpiry() time.Time
	Token() (*oauth2.Token, error)
}

Manager is a client for an OIDC provider capable of authenticating users and retrieving ID tokens through

  • Authorization code grant flow using browser for interactive use
  • Resource owner password credentials flow for non-interactive use

Manager implements the oauth2.TokenSource interface to interact with client libraries depending on the oauth2 package for obtaining auth token.

func NewManager

func NewManager(oidcIssuerURL, oidcClientID, oidcClientSecret string, logger logger.Logger) Manager

NewManager Constructs a new credential.Manager using the given OIDC provider and client credentials

Jump to

Keyboard shortcuts

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