remove debug logs

This commit is contained in:
Lakhan Samani 2024-01-08 14:28:23 +05:30
parent e5fbaa26e1
commit 0bce901749

View File

@ -3,7 +3,6 @@ package handlers
import ( import (
"crypto/sha256" "crypto/sha256"
"encoding/base64" "encoding/base64"
"fmt"
"net/http" "net/http"
"strings" "strings"
"time" "time"
@ -264,14 +263,10 @@ func TokenHandler() gin.HandlerFunc {
"roles": roles, "roles": roles,
"expires_in": expiresIn, "expires_in": expiresIn,
} }
fmt.Println("=> scopes:", scope)
fmt.Println("=> refreshToken:", authToken.RefreshToken)
if authToken.RefreshToken != nil { if authToken.RefreshToken != nil {
log.Debug("Refresh token is present: ", fmt.Sprintf("%s:%s", sessionKey, constants.TokenTypeRefreshToken+"_"+authToken.FingerPrint))
res["refresh_token"] = authToken.RefreshToken.Token res["refresh_token"] = authToken.RefreshToken.Token
memorystore.Provider.SetUserSession(sessionKey, constants.TokenTypeRefreshToken+"_"+authToken.FingerPrint, authToken.RefreshToken.Token, authToken.RefreshToken.ExpiresAt) memorystore.Provider.SetUserSession(sessionKey, constants.TokenTypeRefreshToken+"_"+authToken.FingerPrint, authToken.RefreshToken.Token, authToken.RefreshToken.ExpiresAt)
} }
fmt.Printf("=> res %v", res)
gc.JSON(http.StatusOK, res) gc.JSON(http.StatusOK, res)
} }
} }