Skip to content

Commit 149d0ca

Browse files
committed
fix: add missing info for openid config
Resolves #304
1 parent 8863140 commit 149d0ca

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

server/handlers/jwks.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ func JWKsHandler() gin.HandlerFunc {
2727
c.JSON(500, gin.H{
2828
"error": err.Error(),
2929
})
30-
3130
return
3231
}
33-
3432
c.JSON(200, gin.H{
3533
"keys": []map[string]string{
3634
data,

server/handlers/openid_config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ func OpenIDConfigurationHandler() gin.HandlerFunc {
2020
"token_endpoint": issuer + "/oauth/token",
2121
"userinfo_endpoint": issuer + "/userinfo",
2222
"jwks_uri": issuer + "/.well-known/jwks.json",
23+
"registration_endpoint": issuer + "/app",
2324
"response_types_supported": []string{"code", "token", "id_token"},
24-
"scopes_supported": []string{"openid", "email", "profile", "email_verified", "given_name", "family_name", "nick_name", "picture"},
25+
"scopes_supported": []string{"openid", "email", "profile"},
2526
"response_modes_supported": []string{"query", "fragment", "form_post", "web_message"},
27+
"subject_types_supported": "public",
2628
"id_token_signing_alg_values_supported": []string{jwtType},
2729
"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"},
2830
})

server/handlers/userinfo.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package handlers
22

33
import (
44
"encoding/json"
5-
"fmt"
65
"net/http"
76

87
"github.com/gin-gonic/gin"
@@ -50,7 +49,6 @@ func UserInfoHandler() gin.HandlerFunc {
5049
})
5150
return
5251
}
53-
fmt.Println("=> str:", string(userBytes))
5452
res := map[string]interface{}{}
5553
err = json.Unmarshal(userBytes, &res)
5654
if err != nil {

server/token/auth_token.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@ func CreateIDToken(user models.User, roles []string, hostname, nonce, atHash, cH
403403
"login_method": loginMethod,
404404
claimKey: roles,
405405
}
406-
407406
// split nonce to see if its authorization code grant method
408407
if cHash != "" {
409408
customClaims["at_hash"] = atHash

0 commit comments

Comments
 (0)