oauthserver

package
v0.0.0-...-d125d34 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyClientID    = "client_id"
	KeyScope       = "scope"
	KeyState       = "state"
	KeyRedirectURI = "redirect_uri"
	KeyAuthorize   = "authorize"

	KeyCode         = "code"
	KeyRefreshToken = "refresh_token"
	KeyClientSecret = "client_secret"

	KeyGrantType          = "grant_type"
	GrantTypeAuthCode     = "authorization_code"
	GrantTypeRefreshToken = "refresh_token"

	Authorized = "1"
)
View Source
const (
	BasicPath       = "/login/oauth"
	AuthorizePath   = "/authorize"
	AccessTokenPath = "/access_token"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func NewAPI

func NewAPI(oauthServerController oauth.Controller,
	oauthAppController oauthapp.Controller, oauthHTMLLocation string, scopeService scope.Service) *API

func (*API) HandleAccessTokenReq

func (a *API) HandleAccessTokenReq(c *gin.Context)

func (*API) HandleAuthorizationGetReq

func (a *API) HandleAuthorizationGetReq(c *gin.Context)

func (*API) HandleAuthorizationReq

func (a *API) HandleAuthorizationReq(c *gin.Context)

func (*API) RegisterRoute

func (a *API) RegisterRoute(engine *gin.Engine)

type AuthorizationPageParams

type AuthorizationPageParams struct {
	UserName    string
	RedirectURL string
	State       string
	ClientID    string
	HomeURL     string
	Scope       string
	ClientName  string
	ScopeBasic  []ScopeBasic
}

type ScopeBasic

type ScopeBasic struct {
	Name string
	Desc string
}

Jump to

Keyboard shortcuts

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