http

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package http provides an HTTP handler for an OAuth 2.0 server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableCaching

func DisableCaching(w http.ResponseWriter)

DisableCaching disables HTTP caching on client.

func NewTokenContext

func NewTokenContext(req *http.Request) *oauth.TokenContext

NewTokenContext creates a new instance of TokenContext based on specified gin context.

Types

type TokenServer

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

A TokenServer represents a HTTP server for TokenService.

func NewTokenServer

func NewTokenServer(svcToken *oauth.TokenService) *TokenServer

NewTokenServer creates a new instance of TokenServer.

func (*TokenServer) AccessTokenRequest

func (srv *TokenServer) AccessTokenRequest(
	w http.ResponseWriter,
	r *http.Request,
)

AccessTokenRequest is a endpoint that receives a request to create a new access token.

func (*TokenServer) SetHandler

func (srv *TokenServer) SetHandler(grantType string, handler oauth.TokenHandlerFunc)

SetHandler register a new handler for specified grant type.

Jump to

Keyboard shortcuts

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