auth

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHandler

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

func New

func New(auth *auth.AuthService) *AuthHandler

func (*AuthHandler) AuthTokenUI added in v0.8.4

func (h *AuthHandler) AuthTokenUI(ctx *gin.Context)

func (*AuthHandler) OTPRequest

func (h *AuthHandler) OTPRequest(ctx *gin.Context)

func (*AuthHandler) OTPVerify

func (h *AuthHandler) OTPVerify(ctx *gin.Context)

func (*AuthHandler) Refresh

func (h *AuthHandler) Refresh(ctx *gin.Context)

type OTPRequest

type OTPRequest struct {
	Email string `json:"email" binding:"required"`
}

OTPRequest is the request for an OTP code to be sent to the user's email.

type OTPRequestResponse

type OTPRequestResponse struct {
	Email string `json:"email"`
}

OTPRequestResponse is the response for an OTP code to be sent to the user's email.

type OTPVerifyRequest

type OTPVerifyRequest struct {
	Email string `json:"email" binding:"required"`
	Code  string `json:"code" binding:"required"`
}

OTPVerifyRequest is the request for a verified OTP code.

type OTPVerifyResponse

type OTPVerifyResponse RefreshResponse

OTPVerifyResponse is the response for a verified OTP code.

type RefreshRequest

type RefreshRequest struct {
	OldRefreshToken string `json:"refreshToken" binding:"required"`
}

RefreshRequest is the request for a new access token.

type RefreshResponse

type RefreshResponse struct {
	AccessToken  string `json:"accessToken"`
	RefreshToken string `json:"refreshToken"`
}

RefreshResponse is the response for a new access token.

Jump to

Keyboard shortcuts

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