Skip to content

Commit 0b91d50

Browse files
authored
Fix for passing claims parameter using request object (#56)
1 parent a6f11eb commit 0b91d50

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

internal/oauth2/jwt.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,13 @@ func RequestObjectClaims(params url.Values, serverConfig ServerConfig, clientCon
112112
continue
113113
}
114114

115-
claims[key] = values[0]
115+
val := values[0]
116+
117+
if len(val) > 0 && val[0] == '{' {
118+
claims[key] = json.RawMessage(val)
119+
} else {
120+
claims[key] = val
121+
}
116122
}
117123

118124
return claims, nil

0 commit comments

Comments
 (0)