Merge pull request #332 from authorizerdev/fix/open-id
fix: add missing info for openid config
This commit is contained in:
commit
df406ba053
|
@ -27,10 +27,8 @@ func JWKsHandler() gin.HandlerFunc {
|
|||
c.JSON(500, gin.H{
|
||||
"error": err.Error(),
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(200, gin.H{
|
||||
"keys": []map[string]string{
|
||||
data,
|
||||
|
|
|
@ -20,9 +20,11 @@ func OpenIDConfigurationHandler() gin.HandlerFunc {
|
|||
"token_endpoint": issuer + "/oauth/token",
|
||||
"userinfo_endpoint": issuer + "/userinfo",
|
||||
"jwks_uri": issuer + "/.well-known/jwks.json",
|
||||
"registration_endpoint": issuer + "/app",
|
||||
"response_types_supported": []string{"code", "token", "id_token"},
|
||||
"scopes_supported": []string{"openid", "email", "profile", "email_verified", "given_name", "family_name", "nick_name", "picture"},
|
||||
"scopes_supported": []string{"openid", "email", "profile"},
|
||||
"response_modes_supported": []string{"query", "fragment", "form_post", "web_message"},
|
||||
"subject_types_supported": "public",
|
||||
"id_token_signing_alg_values_supported": []string{jwtType},
|
||||
"claims_supported": []string{"aud", "exp", "iss", "iat", "sub", "given_name", "family_name", "middle_name", "nickname", "preferred_username", "picture", "email", "email_verified", "roles", "role", "gender", "birthdate", "phone_number", "phone_number_verified", "nonce", "updated_at", "created_at", "revoked_timestamp", "login_method", "signup_methods", "token_type"},
|
||||
})
|
||||
|
|
|
@ -2,7 +2,6 @@ package handlers
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
@ -50,7 +49,6 @@ func UserInfoHandler() gin.HandlerFunc {
|
|||
})
|
||||
return
|
||||
}
|
||||
fmt.Println("=> str:", string(userBytes))
|
||||
res := map[string]interface{}{}
|
||||
err = json.Unmarshal(userBytes, &res)
|
||||
if err != nil {
|
||||
|
|
|
@ -403,7 +403,6 @@ func CreateIDToken(user models.User, roles []string, hostname, nonce, atHash, cH
|
|||
"login_method": loginMethod,
|
||||
claimKey: roles,
|
||||
}
|
||||
|
||||
// split nonce to see if its authorization code grant method
|
||||
if cHash != "" {
|
||||
customClaims["at_hash"] = atHash
|
||||
|
|
Loading…
Reference in New Issue
Block a user