loginhandler

package
v1.23.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginForm

type LoginForm struct {
	Username string `form:"username" json:"username" binding:"required"`
	Password string `form:"password" json:"password" binding:"required"`
}

type OAuthHandler

type OAuthHandler struct {
	DB         *gorm.DB
	AuthModule auth.AuthenticateModule
	JWTOptions *jwt.Options
}

func (*OAuthHandler) GetOauthAddr

func (h *OAuthHandler) GetOauthAddr(c *gin.Context)

@Summary 获取OAUTH登录地址 @Description 获取OAUTH登录地址 @Tags AAAAA @Accept json @Produce json @Success 200 {string} string "地址" @Router /v1/oauth/addr [get]

func (*OAuthHandler) GetOauthToken

func (h *OAuthHandler) GetOauthToken(c *gin.Context)

@Summary OAUTH登录callback @Description OAUTH登录callback @Tags AAAAA @Accept json @Produce json @Success 200 {string} string "地址" @Param source path string true "loginsource" @Router /v1/oauth/callback [get]

func (*OAuthHandler) LoginHandler

func (h *OAuthHandler) LoginHandler(c *gin.Context)

FakeLogin 实际上这个没有用的,只是为了生成swagger文档 @Summary JWT登录 @Tags AAAAA @Description 登录JWT @Accept json @Produce json @Param param body LoginForm true "表单" @Success 200 {string} string "登录成功" @Failure 401 {string} string "登录失败" @Router /v1/login [post]

Jump to

Keyboard shortcuts

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