authn

package
v0.0.0-...-8b8382b Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Localhost

func Localhost(ctx context.Context) bool

Localhost returns true if the localhost flag has been set.

func Token

func Token(ctx context.Context) string

Token returns the token stored in the context, if there is one.

func X509Certs

func X509Certs(ctx context.Context) []*x509.Certificate

X509Certs returns the cert stored in the context, if it exists.

Types

type API

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

func NewAPI

func NewAPI(tokens *accesstoken.CredentialStore, crosscorePrefix string, rootCAs *x509.CertPool) *API

func (*API) Authenticate

func (a *API) Authenticate(req *http.Request) (*http.Request, error)

Authenticate returns the request, with added tokens and/or localhost flags in the context, as appropriate.

Jump to

Keyboard shortcuts

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