mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
feat: add refresh token to token login response (#1458)
Signed-off-by: 疯魔慕薇 <kfanjian@gmail.com> Signed-off-by: 疯魔慕薇 <kfanjian@gmail.com>
This commit is contained in:
parent
6daadf8d3c
commit
fcb80b800f
@ -52,7 +52,7 @@ func tokenToResponse(token *object.Token) *Response {
|
|||||||
if token.AccessToken == "" {
|
if token.AccessToken == "" {
|
||||||
return &Response{Status: "error", Msg: "fail to get accessToken", Data: token.AccessToken}
|
return &Response{Status: "error", Msg: "fail to get accessToken", Data: token.AccessToken}
|
||||||
}
|
}
|
||||||
return &Response{Status: "ok", Msg: "", Data: token.AccessToken}
|
return &Response{Status: "ok", Msg: "", Data: token.AccessToken, Data2: token.RefreshToken}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HandleLoggedIn ...
|
// HandleLoggedIn ...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user