oauth

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SigningMethod = jwt.SigningMethodHS256

Functions

func HandleAuthorizeRequest

func HandleAuthorizeRequest(c *gin.Context)

HandleAuthorizeRequest the authorization request handling

func HandleTokenRequest

func HandleTokenRequest(c *gin.Context)

HandleTokenRequest token request handling

func HandleTokenVerify

func HandleTokenVerify() gin.HandlerFunc

HandleTokenVerify Verify the access token of the middleware

Types

type CustomClaims

type CustomClaims struct {
	AccessClaims *generates.JWTAccessClaims `json:"-"`
	ClientID     string                     `json:"client_id"`
	UserID       string                     `json:"user_id"`
	Scope        string                     `json:"scope"`
}

func (*CustomClaims) Valid

func (c *CustomClaims) Valid() error

type TokenGenerate

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

func (*TokenGenerate) Token

func (t *TokenGenerate) Token(data *oauth2.GenerateBasic, isGenRefresh bool) (access, refresh string, err error)

Jump to

Keyboard shortcuts

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