roles

package
v0.0.0-...-85a8e8d Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IdentityProvider

type IdentityProvider interface {
	// Applicable returns true if the provider is applicable for the request
	Applicable(*http.Request) bool
	// IdentityMapper returns identity from the request
	IdentityMapper(*http.Request) (identity.Identity, error)
}

IdentityProvider interface to extract identity from requests

type Provider

type Provider struct {
	CertMapper   *certmapper.Provider
	JwtMapper    *jwtmapper.Provider
	APIkeyMapper *apikeymapper.Provider
}

Provider for authz identity

func New

func New(jwtMapper, apiKeyMapper, certMapper string) (*Provider, error)

New returns Authz provider instance

func (*Provider) IdentityMapper

func (p *Provider) IdentityMapper(r *http.Request) (identity.Identity, error)

IdentityMapper returns identity from the request

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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