mirror of
https://github.com/go-gitea/gitea
synced 2025-07-28 05:08:37 +00:00
Improve OAuth2 provider (correct Issuer, respect ENABLED) (#34966)
1. Make "Issuer" strictly follow the spec (see comment) 2. Make "/.well-known/openid-configuration" respond 404 if the OAuth2 provider is not enabled. Then by the way, remove the JSEscape template helper because it is not needed any more.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"info": {
|
||||
"version": "{{AppVer | JSEscape}}"
|
||||
"version": "{{.SwaggerAppVer}}"
|
||||
},
|
||||
"basePath": "{{AppSubUrl | JSEscape}}/api/v1"
|
||||
"basePath": "{{.SwaggerAppSubUrl}}/api/v1"
|
||||
}
|
||||
|
4
templates/swagger/v1_json.tmpl
generated
4
templates/swagger/v1_json.tmpl
generated
@@ -19,9 +19,9 @@
|
||||
"name": "MIT",
|
||||
"url": "http://opensource.org/licenses/MIT"
|
||||
},
|
||||
"version": "{{AppVer | JSEscape}}"
|
||||
"version": "{{.SwaggerAppVer}}"
|
||||
},
|
||||
"basePath": "{{AppSubUrl | JSEscape}}/api/v1",
|
||||
"basePath": "{{.SwaggerAppSubUrl}}/api/v1",
|
||||
"paths": {
|
||||
"/activitypub/user-id/{user-id}": {
|
||||
"get": {
|
||||
|
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"issuer": "{{AppUrl | JSEscape}}",
|
||||
"authorization_endpoint": "{{AppUrl | JSEscape}}login/oauth/authorize",
|
||||
"token_endpoint": "{{AppUrl | JSEscape}}login/oauth/access_token",
|
||||
"jwks_uri": "{{AppUrl | JSEscape}}login/oauth/keys",
|
||||
"userinfo_endpoint": "{{AppUrl | JSEscape}}login/oauth/userinfo",
|
||||
"introspection_endpoint": "{{AppUrl | JSEscape}}login/oauth/introspect",
|
||||
"issuer": "{{.OidcIssuer}}",
|
||||
"authorization_endpoint": "{{.OidcBaseUrl}}/login/oauth/authorize",
|
||||
"token_endpoint": "{{.OidcBaseUrl}}/login/oauth/access_token",
|
||||
"jwks_uri": "{{.OidcBaseUrl}}/login/oauth/keys",
|
||||
"userinfo_endpoint": "{{.OidcBaseUrl}}/login/oauth/userinfo",
|
||||
"introspection_endpoint": "{{.OidcBaseUrl}}/login/oauth/introspect",
|
||||
"response_types_supported": [
|
||||
"code",
|
||||
"id_token"
|
||||
],
|
||||
"id_token_signing_alg_values_supported": [
|
||||
"{{.SigningKey.SigningMethod.Alg | JSEscape}}"
|
||||
"{{.SigningKeyMethodAlg}}"
|
||||
],
|
||||
"subject_types_supported": [
|
||||
"public"
|
||||
|
Reference in New Issue
Block a user