unixauth

package
v0.0.0-...-4450389 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDomainNotFound = errors.New("`unix` domain not found")
View Source
var ErrMissingContextAuthenticator = errors.New("missing ContextAuthenticator")
View Source
var ErrMissingDomain = errors.New("missing Domain")
View Source
var ErrMissingUnixClaim = errors.New("identity without `unix` claim")

Functions

This section is empty.

Types

type UserAuthn

type UserAuthn struct {
	ContextAuthenticator auth.Authenticator
	Domain               string
}

`UserAuthn.Authenticate(ctx)` uses the `ContextAuthenticator` to get an `auth.Identity` from the context. It then searches the `Domain` in the identity field `unix` and stores the selected entry of type `auth.UnixIdentity` in the identity field `unixLocal`. `Authenticate()` returns an error if any of the steps fails.

func (*UserAuthn) Authenticate

func (a *UserAuthn) Authenticate(ctx context.Context) (auth.Identity, error)

Jump to

Keyboard shortcuts

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