ginhttp

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

Documentation

Overview

Package ginhttp provides an HTTP handler for an OAuth 2.0 server (gin-gonic/gin).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenServer

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

A TokenServer represents a gin-backed HTTP server for TokenService.

func NewTokenServer

func NewTokenServer(svcToken *oauth.TokenService) *TokenServer

NewTokenServer creates a new instance of TokenServer.

func (*TokenServer) AccessTokenRequest

func (s *TokenServer) AccessTokenRequest(c *gin.Context)

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

func (*TokenServer) SetHandler

func (s *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