mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-22 17:25:06 +03:00
refactor: fix code smells
This commit is contained in:
@@ -492,9 +492,8 @@ func (s *OidcService) GetUserClaimsForClient(userID string, clientID string) (ma
|
||||
for _, customClaim := range customClaims {
|
||||
// The value of the custom claim can be a JSON object or a string
|
||||
var jsonValue interface{}
|
||||
//nolint:errcheck // Ignore error for JSON unmarshalling
|
||||
json.Unmarshal([]byte(customClaim.Value), &jsonValue)
|
||||
if jsonValue != nil {
|
||||
err := json.Unmarshal([]byte(customClaim.Value), &jsonValue)
|
||||
if err == nil {
|
||||
// It's JSON so we store it as an object
|
||||
claims[customClaim.Key] = jsonValue
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user