authenticators

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: Apache-2.0, BSD-3-Clause, MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package authenticators contains logic for setting up an Open ID Connect authenticator

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOIDCAuthenticator

func NewOIDCAuthenticator(ctx context.Context, options *OIDCOptions) (security.Authenticator, string, error)

NewOIDCAuthenticator returns a new OpenID authenticator or an error if one couldn't be configured

Types

type OIDCOptions

type OIDCOptions struct {
	// IssuerURL is the base URL of the token issuer
	IssuerURL string

	// ClientID is the id of the oauth client used to verify the tokens
	ClientID string

	// ReadConfigurationFunc is the function used to call the token issuer. If one is not provided, http.DefaultClient.Do will be used
	ReadConfigurationFunc util.DoRequestFunc
}

OIDCOptions is the configuration used to construct a new OIDC authenticator

type OauthAuthenticator

type OauthAuthenticator struct {
	Verifier security.TokenVerifier
}

OauthAuthenticator is the OpenID implementation of security.Authenticator

func (*OauthAuthenticator) Authenticate

func (a *OauthAuthenticator) Authenticate(request *http.Request) (*web.UserContext, security.Decision, error)

Authenticate returns information about the user by obtaining it from the bearer token, or an error if security is unsuccessful

Jump to

Keyboard shortcuts

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