From 71294eaf70312e2ab62be12a081d77f98f8b9d39 Mon Sep 17 00:00:00 2001 From: "ext.sopra.yvallet@grandlyon.com" <ext.sopra.yvallet@grandlyon.com> Date: Mon, 19 Oct 2020 18:03:47 +0200 Subject: [PATCH] use IdToken instead of AccessToken --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index ac6daca..cbda2cd 100644 --- a/main.go +++ b/main.go @@ -494,11 +494,11 @@ func main() { http.Error(w, decodeError.Error(), 500) return } - // Check if AccessToken exist + // Check if IdToken exist // Decode the token and retrieve the pce from it - if len(data.AccessToken) > 0 { - log.Debug("Access Token : ", data.AccessToken) - s := strings.Split(data.AccessToken, ".") + if len(data.IdToken) > 0 { + log.Debug("Access Token : ", data.IdToken) + s := strings.Split(data.IdToken, ".") if len(s[1]) > 0 { log.Debug("Split Access Token : ", s[1]) payload, _ := base64.StdEncoding.DecodeString(s[1]) -- GitLab