auth

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCompatProvider

type AuthCompatProvider interface {
	GenerateCaptcha(ctx context.Context) (*CompatGenerateCaptchaResult, error)
	VerifySliderCaptcha(ctx context.Context, id string, x, y int, trail string) (*CompatSliderVerifyResult, error)
	DeviceLogin(ctx context.Context, params *CompatDeviceLoginParams) (*authbiz.LoginResult, error)
	AdminLogin(ctx context.Context, params *CompatAdminLoginParams) (*authbiz.LoginResult, error)
	AdminResetPassword(ctx context.Context, params *CompatAdminResetPasswordParams) (*authbiz.LoginResult, error)
}

type AuthService

type AuthService struct {
	pb.UnimplementedAuthServer
	// contains filtered or unexported fields
}

func NewAuthService

func NewAuthService(uc *authbiz.AuthUsecase) *AuthService

func (*AuthService) AdminGenerateCaptcha

func (s *AuthService) AdminGenerateCaptcha(ctx context.Context, req *emptypb.Empty) (*pb.GenerateCaptchaReply, error)

func (*AuthService) AdminLogin

func (s *AuthService) AdminLogin(ctx context.Context, req *pb.UserLoginRequest) (*pb.LoginReply, error)

func (*AuthService) AdminResetPassword

func (s *AuthService) AdminResetPassword(ctx context.Context, req *pb.ResetPasswordRequest) (*pb.LoginReply, error)

func (*AuthService) AdminVerifySliderCaptcha

func (s *AuthService) AdminVerifySliderCaptcha(ctx context.Context, req *pb.VerifySliderCaptchaRequest) (*pb.VerifySliderCaptchaReply, error)

func (*AuthService) CheckUser

func (s *AuthService) CheckUser(ctx context.Context, req *pb.CheckUserRequest) (*pb.CheckUserReply, error)

func (*AuthService) CheckUserTelephone

func (*AuthService) DeviceLogin

func (s *AuthService) DeviceLogin(ctx context.Context, req *pb.DeviceLoginRequest) (*pb.LoginReply, error)

func (*AuthService) GenerateCaptcha

func (s *AuthService) GenerateCaptcha(ctx context.Context, req *emptypb.Empty) (*pb.GenerateCaptchaReply, error)

func (*AuthService) ResetPassword

func (s *AuthService) ResetPassword(ctx context.Context, req *pb.ResetPasswordRequest) (*pb.LoginReply, error)

func (*AuthService) SetAuthCompat

func (s *AuthService) SetAuthCompat(authCompat AuthCompatProvider)

func (*AuthService) TelephoneLogin

func (s *AuthService) TelephoneLogin(ctx context.Context, req *pb.TelephoneLoginRequest) (*pb.LoginReply, error)

func (*AuthService) TelephoneRegister

func (s *AuthService) TelephoneRegister(ctx context.Context, req *pb.TelephoneRegisterRequest) (*pb.LoginReply, error)

func (*AuthService) TelephoneResetPassword

func (s *AuthService) TelephoneResetPassword(ctx context.Context, req *pb.TelephoneResetPasswordRequest) (*pb.LoginReply, error)

func (*AuthService) UserLogin

func (s *AuthService) UserLogin(ctx context.Context, req *pb.UserLoginRequest) (*pb.LoginReply, error)

func (*AuthService) UserRegister

func (s *AuthService) UserRegister(ctx context.Context, req *pb.UserRegisterRequest) (*pb.LoginReply, error)

func (*AuthService) VerifySliderCaptcha

type CompatAdminLoginParams

type CompatAdminLoginParams struct {
	Email    string
	Password string
	Meta     authbiz.RequestMeta
}

type CompatAdminResetPasswordParams

type CompatAdminResetPasswordParams struct {
	Email    string
	Password string
	Code     string
	Meta     authbiz.RequestMeta
}

type CompatDeviceLoginParams

type CompatDeviceLoginParams struct {
	Identifier string
	ShortCode  string
	Meta       authbiz.RequestMeta
}

type CompatGenerateCaptchaResult

type CompatGenerateCaptchaResult struct {
	ID         string
	Image      string
	Type       string
	BlockImage string
}

type CompatSliderVerifyResult

type CompatSliderVerifyResult struct {
	Token string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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