- v2 ChangeMobile
This commit is contained in:
@@ -122,6 +122,14 @@ func (ctx *Context) GetLoginInfo() IAuther {
|
||||
return ctx.userInfo
|
||||
}
|
||||
|
||||
func (ctx *Context) GetV2AuthInfo() (authInfo *auth2.AuthInfo, err error) {
|
||||
authInfo, ok := ctx.userInfo.(*auth2.AuthInfo)
|
||||
if ok {
|
||||
return authInfo, nil
|
||||
}
|
||||
return nil, auth2.ErrNeedV2Token
|
||||
}
|
||||
|
||||
func (ctx *Context) GetRootTask() tasksch.ITask {
|
||||
ctx.locker.RLock()
|
||||
defer ctx.locker.RUnlock()
|
||||
|
||||
Reference in New Issue
Block a user