Categorygithub.com/snowlyg/multi
modulepackage
0.0.42
Repository: https://github.com/snowlyg/multi.git
Documentation: pkg.go.dev

# README

Multi

GitHub license go doc Build Status Codecov

Golang Web 框架认证中间件

安装

  go get github.com/snowlyg/multi@latest

文档

简单使用

完整使用

# Packages

No description provided by the author
No description provided by the author

# Functions

Base64Decode decodes "src" to jwt base64 url format.
Base64Encode.
GetToken 雪花算法,支持分布式集群方式.
GetTokenExpire 过期时间.
GetUserPrefixKey.
InitDriver 认证驱动 redis 需要设置redis local 使用本地内存.
No description provided by the author
NewJwtAuth.
No description provided by the author
NewRedisAuth.

# Constants

管理员.
授权类型.
授权类型.
授权类型.
普通用户.
token 绑定用户前缀.
token 缓存前缀.
用户最大 token 数前缀.
用户前缀.
登陆类型.
登陆类型.
登陆类型.
登陆类型.
授权类型.
空授权.
商户.
No description provided by the author
No description provided by the author
No description provided by the author
EXP validation failed.
No description provided by the author
No description provided by the author
Token is malformed.
Signature validation failed.
Token could not be verified because of signing problems.
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
错误类型.
错误类型.
错误类型.
No description provided by the author
7 天.
1年.
4 小时.
1年.

# Structs

No description provided by the author
JwtAuth.
No description provided by the author
Multi.
自定义结构 Id 用户id Username 用户名 TenancyId 商户id TenancyName 商户名称 AuthorityId 角色id AuthorityType 角色类型 LoginType 登录类型 web,app,wechat AuthType 授权类型 密码,验证码,第三方 CreationDate 登录时间 ExpiresIn 有效期.
RedisAuth.

# Interfaces

Authentication 认证.
No description provided by the author

# Type aliases

No description provided by the author