auth

package
v0.0.0-...-5e81e3c Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyOIDCIssuer      = errors.New("could not continue with empty OIDC issuer")
	ErrEmptyOIDCClientID    = errors.New("could not continue with empty OIDC client ID")
	ErrEmptyOIDCRedirectURL = errors.New("could not continue with empty OIDC redirect URL")

	ErrNotLoggedIn = errors.New("could not continue without being logged in")

	ErrEmptyMetricsAuthorizedEmail = errors.New("could not continue with empty metrics authorization email")
)
View Source
var (
	ErrClosed = errors.New("authenticator has not been opened")
)
View Source
var (
	ErrEmptyOIDCClientSecret = errors.New("could not continue with empty OIDC client secret")
)

Functions

This section is empty.

Types

type JWTAuthn

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

func NewJWTAuthn

func NewJWTAuthn(issuer string, clientID string, audience string) *JWTAuthn

func (*JWTAuthn) Open

func (a *JWTAuthn) Open(ctx context.Context) error

func (*JWTAuthn) Validate

func (a *JWTAuthn) Validate(token string) error

type OIDCAuthn

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

func NewOIDCAuthn

func NewOIDCAuthn(issuer string, clientID string) *OIDCAuthn

func (*OIDCAuthn) Open

func (a *OIDCAuthn) Open(ctx context.Context) error

func (*OIDCAuthn) Validate

func (a *OIDCAuthn) Validate(token string) (string, error)

type TokenManagerAuthorizationCode

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

Extended from https://github.com/pojntfx/goit/blob/main/pkg/token/token.go

func NewTokenManagerAuthorizationCode

func NewTokenManagerAuthorizationCode(
	oidcIssuer string,
	oidcClientID string,
	oidcRedirectURL string,

	openURL func(string) error,

	ctx context.Context,
) *TokenManagerAuthorizationCode

func (*TokenManagerAuthorizationCode) GetIDToken

func (t *TokenManagerAuthorizationCode) GetIDToken() (string, error)

func (*TokenManagerAuthorizationCode) InitialLogin

func (t *TokenManagerAuthorizationCode) InitialLogin() error

type TokenManagerClientCredentials

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

Extended from https://github.com/pojntfx/goit/blob/main/pkg/token/token.go

func NewTokenManagerClientCredentials

func NewTokenManagerClientCredentials(
	oidcIssuer string,
	oidcClientID string,
	oidcClientSecret string,
	oidcAudience string,

	ctx context.Context,
) *TokenManagerClientCredentials

func (*TokenManagerClientCredentials) GetIDToken

func (t *TokenManagerClientCredentials) GetIDToken() (string, error)

func (*TokenManagerClientCredentials) InitialLogin

func (t *TokenManagerClientCredentials) InitialLogin() error

Jump to

Keyboard shortcuts

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