generator

package
v0.0.0-...-64e8fac Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HorizonAppUserToServerAccessTokenPrefix = "hu_"
	OauthAPPAccessTokenPrefix               = "ho_"
	AccessTokenPrefix                       = "ha_"
	RefreshTokenPrefix                      = "hr_"
)

ref: https://github.blog/2021-04-05-behind-githubs-new-authentication-token-formats/

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeGenerateInfo

type CodeGenerateInfo struct {
	Token   models.Token
	Request *http.Request
}

type CodeGenerator

type CodeGenerator interface {
	Generate(info *CodeGenerateInfo) string
}

func NewAuthorizeGenerator

func NewAuthorizeGenerator() CodeGenerator

func NewGeneralAccessTokenGenerator

func NewGeneralAccessTokenGenerator() CodeGenerator

func NewHorizonAppUserToServerAccessGenerator

func NewHorizonAppUserToServerAccessGenerator() CodeGenerator

func NewOauthAccessGenerator

func NewOauthAccessGenerator() CodeGenerator

func NewRefreshTokenGenerator

func NewRefreshTokenGenerator() CodeGenerator

Jump to

Keyboard shortcuts

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