iam

package
v0.0.0-...-0f3e1e6 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyIAM

type DummyIAM struct{}

DummyIAM implements a dummy IAM interface that does nothing.

func (*DummyIAM) Authenticate

func (iam *DummyIAM) Authenticate(*http.Request) (interface{}, error)

Authenticate is a no-op

func (*DummyIAM) Authorize

func (iam *DummyIAM) Authorize(*http.Request, interface{}) error

Authorize is a no-op

func (*DummyIAM) Init

func (iam *DummyIAM) Init(string) error

Init is a no-op

type IAM

type IAM interface {
	// Init is called with an auth config file as defined in the application config.  The
	// implementation loads its specific configuration from this file when fabio starts.
	// This is referenced as a sperate file as it will contain auth data.
	Init(cfgfile string) error
	// Authenticate should authenticate a request and return any data needed for
	// Authorization or an error on failure.
	Authenticate(r *http.Request) (interface{}, error)
	// Authorize should check the authorization for a request.  authData is the data
	// returned from the Authenticate call.  If should return an error when unauthorized.
	Authorize(r *http.Request, authData interface{}) error
}

IAM implements an identity and access management interface

func New

func New(conf config.Auth) (iam IAM, err error)

New instantiates a new IAM instance

Jump to

Keyboard shortcuts

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