auth

package
v0.0.0-...-60ee369 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthNFunc

type AuthNFunc func(p Principal) bool

type AuthZFunc

type AuthZFunc func(p Principal, s Subject) bool

type Authenticator

type Authenticator interface {
	Authenticated() endpoint.Middleware
	Authorized() endpoint.Middleware
}

func NewAuthenticator

func NewAuthenticator(secret string, authN AuthNFunc, authZ AuthZFunc) Authenticator

type Principal

type Principal interface {
	PrincipalToken() interface{}
}

type Subject

type Subject interface {
	SubjectTokens() []interface{}
}

type Unauthenticated

type Unauthenticated struct{}

func (Unauthenticated) Error

func (Unauthenticated) Error() string

type Unauthorized

type Unauthorized struct{}

func (Unauthorized) Error

func (Unauthorized) Error() string

type UnknownPrincipal

type UnknownPrincipal struct{}

func (UnknownPrincipal) Error

func (UnknownPrincipal) Error() string

type UnknownSubject

type UnknownSubject struct{}

func (UnknownSubject) Error

func (UnknownSubject) Error() string

Jump to

Keyboard shortcuts

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