Documentation
¶
Index ¶
- Constants
- Variables
- func GetAuth(ctx iris.Context) (auth string, ok bool)
- func GetClientType(ctx iris.Context) (ct string)
- func GetDept(ctx iris.Context) (dept string)
- func GetOrg(ctx iris.Context) (org string)
- func GetUid(ctx iris.Context) (uid string)
- func GetUserInfo(ctx iris.Context) (uid token.JwtPayload, err error)
- func JwtAuth(ctx iris.Context)
- type Response
Constants ¶
View Source
const ( Realm = "Bearer " OrgKey = "org" DeptKey = "dept" ClientKey = "clientType" UidKey = "uid" UserInfoKey = "ui" )
Variables ¶
View Source
var (
ErrNotAllowed = errors.New("401 not allowed")
)
View Source
var TokenStorage token.Storage
Functions ¶
func GetClientType ¶
func GetUserInfo ¶
func GetUserInfo(ctx iris.Context) (uid token.JwtPayload, err error)
Types ¶
Click to show internal directories.
Click to hide internal directories.