handlers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Deny = denyAuthenticator{}

Functions

This section is empty.

Types

type AccessAuthenticator

type AccessAuthenticator struct {
	// contains filtered or unexported fields
}

func NewAccessAuthenticator

func NewAccessAuthenticator(password authenticator.Password, assertion authenticator.Assertion, client authenticator.Client) *AccessAuthenticator

func NewDenyAccessAuthenticator

func NewDenyAccessAuthenticator() *AccessAuthenticator

func (*AccessAuthenticator) HandleAccess

func (h *AccessAuthenticator) HandleAccess(ar *osin.AccessRequest, w http.ResponseWriter, req *http.Request)

type AuthenticationErrorHandler

type AuthenticationErrorHandler interface {
	AuthenticationError(err error, w http.ResponseWriter, req *http.Request)
}

type AuthenticationHandler

type AuthenticationHandler interface {
	AuthenticationNeeded(w http.ResponseWriter, req *http.Request)
	AuthenticationError(err error, w http.ResponseWriter, req *http.Request)
}

type AuthenticationSuccessHandler

type AuthenticationSuccessHandler interface {
	AuthenticationSucceeded(user api.UserInfo, state string, w http.ResponseWriter, req *http.Request) error
}

type AuthenticationSuccessHandlers

type AuthenticationSuccessHandlers []AuthenticationSuccessHandler

AuthenticationSuccessHandlers combines multiple AuthenticationSuccessHandler objects into a chain. On success, each handler is called. If any handler returns an error, the chain is aborted.

func (AuthenticationSuccessHandlers) AuthenticationSucceeded

func (all AuthenticationSuccessHandlers) AuthenticationSucceeded(user api.UserInfo, state string, w http.ResponseWriter, req *http.Request) error

type AuthorizeAuthenticator

type AuthorizeAuthenticator struct {
	// contains filtered or unexported fields
}

func NewAuthorizeAuthenticator

func NewAuthorizeAuthenticator(handler AuthenticationHandler, request authenticator.Request) *AuthorizeAuthenticator

func (*AuthorizeAuthenticator) HandleAuthorize

func (h *AuthorizeAuthenticator) HandleAuthorize(ar *osin.AuthorizeRequest, w http.ResponseWriter, req *http.Request) (handled bool)

type GrantCheck

type GrantCheck struct {
	// contains filtered or unexported fields
}

func NewGrantCheck

func NewGrantCheck(check GrantChecker, handler GrantHandler) *GrantCheck

func (*GrantCheck) HandleAuthorize

func (h *GrantCheck) HandleAuthorize(ar *osin.AuthorizeRequest, w http.ResponseWriter, req *http.Request) (handled bool)

type GrantChecker

type GrantChecker interface {
	HasAuthorizedClient(client api.Client, user api.UserInfo, grant *api.Grant) (bool, error)
}

type GrantHandler

type GrantHandler interface {
	GrantNeeded(client api.Client, user api.UserInfo, grant *api.Grant, w http.ResponseWriter, req *http.Request)
	GrantError(err error, w http.ResponseWriter, req *http.Request)
}

Jump to

Keyboard shortcuts

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