Skip to content
Snippets Groups Projects
Commit c2a6bfc2 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

store IdToken into account

parent 65b22e54
No related branches found
No related tags found
No related merge requests found
Pipeline #7970 passed
...@@ -400,6 +400,7 @@ func main() { ...@@ -400,6 +400,7 @@ func main() {
scope := "" scope := ""
redirectUri := "https://oauth-proxy.wf.alpha.grandlyon.com/redirect-grdf" redirectUri := "https://oauth-proxy.wf.alpha.grandlyon.com/redirect-grdf"
pce := "" pce := ""
IdToken := ""
// For request token params are into query parameters // For request token params are into query parameters
if len(query) == 0 { if len(query) == 0 {
...@@ -497,8 +498,9 @@ func main() { ...@@ -497,8 +498,9 @@ func main() {
// Check if IdToken exist // Check if IdToken exist
// Decode the token and retrieve the pce from it // Decode the token and retrieve the pce from it
if len(data.IdToken) > 0 { if len(data.IdToken) > 0 {
log.Debug("Access Token : ", data.IdToken) IdToken = data.IdToken
s := strings.Split(data.IdToken, ".") log.Debug("Access Token : ", IdToken)
s := strings.Split(IdToken, ".")
if len(s[1]) > 0 { if len(s[1]) > 0 {
log.Debug("Split Access Token : ", s[1]) log.Debug("Split Access Token : ", s[1])
payload, _ := base64.StdEncoding.DecodeString(s[1]) payload, _ := base64.StdEncoding.DecodeString(s[1])
...@@ -567,6 +569,7 @@ func main() { ...@@ -567,6 +569,7 @@ func main() {
} }
if grantType != "refresh_token"{ if grantType != "refresh_token"{
data.Pce = pce data.Pce = pce
data.IdToken = IdToken
} }
jsonError := json.NewEncoder(w).Encode(data) jsonError := json.NewEncoder(w).Encode(data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment