oauth2

package
v0.8.20 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountInfoRedirBase string = "/auth/account-info"
	LoginRedirBase       string = "/auth/login"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OAuth2

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

func New

func New(p Params) *OAuth2

func (*OAuth2) Callback

func (o *OAuth2) Callback(c *gin.Context)

func (*OAuth2) GetProvider

func (o *OAuth2) GetProvider(c *gin.Context) (providers.IProvider, error)

func (*OAuth2) Login

func (o *OAuth2) Login(c *gin.Context)

func (*OAuth2) RegisterHTTP added in v0.8.20

func (o *OAuth2) RegisterHTTP(e *gin.Engine)

type Params added in v0.8.20

type Params struct {
	fx.In

	Logger *zap.Logger
	DB     *sql.DB
	TM     *auth.TokenMgr
	Config *config.Config
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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