oauth

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 6 Imported by: 0

README

oauth

a OAuth module implemented by go

Features

  • mysql db
  • redis cache
  • local cache
  • add rate limit when generate new token

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OauthManger

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

func GetOauthManager

func GetOauthManager() *OauthManger

func (*OauthManger) CheckOauthToken

func (g *OauthManger) CheckOauthToken(ctx context.Context, partnerKey string, token string) error

func (*OauthManger) DeletePartner

func (g *OauthManger) DeletePartner(ctx context.Context, partnerKey string) error

func (*OauthManger) GenOauthToken

func (g *OauthManger) GenOauthToken(ctx context.Context, partnerKey string, paratnerSecret string) (*db_base.OauthToken, error)

func (*OauthManger) GenPartner

func (g *OauthManger) GenPartner(ctx context.Context, PartnerName string, expire int64) (*db_base.Partner, error)

func (*OauthManger) GetPartnerByKey

func (g *OauthManger) GetPartnerByKey(ctx context.Context, partnerKey string) (*db_base.Partner, error)

func (*OauthManger) StartDeleteExpireTokenProcess

func (g *OauthManger) StartDeleteExpireTokenProcess() error

func (*OauthManger) WithMysql

func (g *OauthManger) WithMysql(config *mysql_db.MysqlDbConfig) *OauthManger

Directories

Path Synopsis
dao

Jump to

Keyboard shortcuts

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