generates

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizeGenerate

type AuthorizeGenerate struct{}

AuthorizeGenerate generate the authorize code

func NewAuthorizeGenerate

func NewAuthorizeGenerate() *AuthorizeGenerate

NewAuthorizeGenerate create to generate the authorize code instance

func (*AuthorizeGenerate) Token

func (ag *AuthorizeGenerate) Token(ctx context.Context, data *oauth2.GenerateBasic) (string, error)

Token based on the UUID generated token 基于UUID生成的令牌

type JWTAccessClaims

type JWTAccessClaims struct {
	jwt.StandardClaims
}

JWTAccessClaims jwt claims

func (*JWTAccessClaims) Valid

func (a *JWTAccessClaims) Valid() error

Valid claims verification

type JWTAccessGenerate

type JWTAccessGenerate struct {
	SignedKeyID  string
	SignedKey    []byte
	SignedMethod jwt.SigningMethod
}

JWTAccessGenerate generate the jwt access token

func NewJWTAccessGenerate

func NewJWTAccessGenerate(kid string, key []byte, method jwt.SigningMethod) *JWTAccessGenerate

NewJWTAccessGenerate create to generate the jwt access token instance

func (*JWTAccessGenerate) Token

func (a *JWTAccessGenerate) Token(ctx context.Context, data *oauth2.GenerateBasic, isGenRefresh bool) (string, string, error)

Token based on the UUID generated token

type UUIDAccessGenerate

type UUIDAccessGenerate struct {
}

AccessGenerate generate the access token

func NewAccessGenerate

func NewAccessGenerate() *UUIDAccessGenerate

NewAccessGenerate create to generate the access token instance

func (*UUIDAccessGenerate) Token

func (ag *UUIDAccessGenerate) Token(ctx context.Context, data *oauth2.GenerateBasic, isGenRefresh bool) (string, string, error)

Token based on the UUID generated token,基于UUID生成的令牌

Jump to

Keyboard shortcuts

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