auth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package auth 授权相关逻辑

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attempt

func Attempt(phone string, password string) (user.User, error)

Attempt 尝试登录

func CurrentID

func CurrentID(c *gin.Context) string

CurrentID 从 gin.context 中获取当前登录用户 UID

func CurrentUID

func CurrentUID(c *gin.Context) string

CurrentUID 从 gin.context 中获取当前登录用户 UID

func CurrentUIDToUint32

func CurrentUIDToUint32(c *gin.Context) uint32

func CurrentUser

func CurrentUser(c *gin.Context) user.User

CurrentUser 从 gin.context 中获取当前登录用户

func LoginByPhone

func LoginByPhone(phone string) user.User

LoginByPhone 登录指定用户

func LoginByPlatUid

func LoginByPlatUid(platUid, channel string) user.User

LoginByPlatUid 第三方登录指定用户

Types

This section is empty.

Jump to

Keyboard shortcuts

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