Merge pull request #332 from authorizerdev/fix/open-id

fix: add missing info for openid config
This commit is contained in:
Lakhan Samani 2023-03-07 08:44:26 +05:30 committed by GitHub
commit df406ba053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 6 deletions

View File

@ -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,

View File

@ -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"},
})

View File

@ -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 {

View File

@ -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