authn

package
v0.0.0-...-2cb5aa6 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package authn is in charge authenticating requests.

Authenticators will be instantiated per identity provider URI. Currently only OpenID is supported.

OpenID configuration and keys will be cached.

Index

Constants

View Source
const CacheTTL = 1 * time.Hour

CacheTTL is the cache duration for remote info like OpenID config or keys.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	ValidateRequest(*http.Request) (*UserInfo, error)
}

Authenticator is in charge of authenticating requests.

func NewAuthenticator

func NewAuthenticator(idP string) (Authenticator, error)

NewAuthenticator instantiates or reuses an existing one for the specified identity provider.

type UserInfo

type UserInfo struct {
	ID     string
	Email  string
	Groups []string
}

UserInfo contains the necessary attributes used in Doorman policies.

Jump to

Keyboard shortcuts

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