osinserver

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: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultServerConfig

func NewDefaultServerConfig() *osin.ServerConfig

Types

type AccessHandler

type AccessHandler interface {
	HandleAccess(ar *osin.AccessRequest, w http.ResponseWriter, r *http.Request)
}

type AccessHandlerFunc

type AccessHandlerFunc func(ar *osin.AccessRequest, w http.ResponseWriter, r *http.Request)

func (AccessHandlerFunc) HandleAccess

func (f AccessHandlerFunc) HandleAccess(ar *osin.AccessRequest, w http.ResponseWriter, r *http.Request)

type AccessHandlers

type AccessHandlers []AccessHandler

func (AccessHandlers) HandleAccess

func (all AccessHandlers) HandleAccess(ar *osin.AccessRequest, w http.ResponseWriter, r *http.Request)

type AuthorizeHandler

type AuthorizeHandler interface {
	HandleAuthorize(ar *osin.AuthorizeRequest, w http.ResponseWriter, r *http.Request) (handled bool)
}

type AuthorizeHandlerFunc

type AuthorizeHandlerFunc func(ar *osin.AuthorizeRequest, w http.ResponseWriter, r *http.Request) bool

func (AuthorizeHandlerFunc) HandleAuthorize

type AuthorizeHandlers

type AuthorizeHandlers []AuthorizeHandler

func (AuthorizeHandlers) HandleAuthorize

func (all AuthorizeHandlers) HandleAuthorize(ar *osin.AuthorizeRequest, w http.ResponseWriter, r *http.Request) bool

type Mux

type Mux interface {
	Handle(pattern string, handler http.Handler)
	HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
}

mux is an object that can register http handlers.

type Server

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

func New

func New(config *osin.ServerConfig, storage osin.Storage, authorize AuthorizeHandler, access AccessHandler) *Server

func (*Server) AuthorizationHandler

func (s *Server) AuthorizationHandler() http.Handler

AuthorizationHandler returns an http.Handler capable of authorizing. Used for implicit authorization special flows.

func (*Server) Install

func (s *Server) Install(mux Mux, paths ...string)

Install registers the Server OAuth handlers into a mux. It is expected that the provided prefix will serve all operations. Path MUST NOT end in a slash.

func (*Server) TokenHandler

func (s *Server) TokenHandler() http.Handler

TokenHandler returns an http.Handler capable of granting tokens. Used for implicit token granting special flows.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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