providers/oauth2: add JWKS URL to OAuth2ProviderSetupURLs
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
7d84a71a01
commit
23023ec727
|
@ -48,6 +48,7 @@ class OAuth2ProviderSetupURLs(PassiveSerializer):
|
|||
user_info = CharField(read_only=True)
|
||||
provider_info = CharField(read_only=True)
|
||||
logout = CharField(read_only=True)
|
||||
jwks = CharField(read_only=True)
|
||||
|
||||
|
||||
class OAuth2ProviderViewSet(UsedByMixin, ModelViewSet):
|
||||
|
@ -119,6 +120,12 @@ class OAuth2ProviderViewSet(UsedByMixin, ModelViewSet):
|
|||
kwargs={"application_slug": provider.application.slug},
|
||||
)
|
||||
)
|
||||
data["jwks"] = request.build_absolute_uri(
|
||||
reverse(
|
||||
"authentik_providers_oauth2:jwks",
|
||||
kwargs={"application_slug": provider.application.slug},
|
||||
)
|
||||
)
|
||||
except Provider.application.RelatedObjectDoesNotExist: # pylint: disable=no-member
|
||||
pass
|
||||
return Response(data)
|
||||
|
|
|
@ -23367,9 +23367,13 @@ components:
|
|||
logout:
|
||||
type: string
|
||||
readOnly: true
|
||||
jwks:
|
||||
type: string
|
||||
readOnly: true
|
||||
required:
|
||||
- authorize
|
||||
- issuer
|
||||
- jwks
|
||||
- logout
|
||||
- provider_info
|
||||
- token
|
||||
|
|
|
@ -62,6 +62,7 @@ msgstr "(Format: hours=-1;minutes=-2;seconds=-3)."
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts
|
||||
#: src/pages/tokens/TokenListPage.ts
|
||||
#: src/pages/users/RelatedUserList.ts
|
||||
|
@ -2745,6 +2746,10 @@ msgstr "Ausstellermodus"
|
|||
msgid "JSON Web Key URL. Keys from the URL will be used to validate JWTs from this source."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
msgid "JWKS URL"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "JWT Algorithm"
|
||||
#~ msgstr "JWT Algorithmus"
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ msgstr "(Format: hours=1;minutes=2;seconds=3)."
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts
|
||||
#: src/pages/tokens/TokenListPage.ts
|
||||
#: src/pages/users/RelatedUserList.ts
|
||||
|
@ -2794,6 +2795,10 @@ msgstr "Issuer mode"
|
|||
msgid "JSON Web Key URL. Keys from the URL will be used to validate JWTs from this source."
|
||||
msgstr "JSON Web Key URL. Keys from the URL will be used to validate JWTs from this source."
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
msgid "JWKS URL"
|
||||
msgstr "JWKS URL"
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderForm.ts
|
||||
#~ msgid "JWT Algorithm"
|
||||
#~ msgstr "JWT Algorithm"
|
||||
|
|
|
@ -49,6 +49,7 @@ msgstr "(Formato: horas = 1; minutos = 2; segundos = 3)."
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts
|
||||
#: src/pages/tokens/TokenListPage.ts
|
||||
#: src/pages/users/RelatedUserList.ts
|
||||
|
@ -2738,6 +2739,10 @@ msgstr "Modo emisor"
|
|||
msgid "JSON Web Key URL. Keys from the URL will be used to validate JWTs from this source."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
msgid "JWKS URL"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "JWT Algorithm"
|
||||
#~ msgstr "algoritmo JWT"
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ msgstr ""
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts
|
||||
#: src/pages/tokens/TokenListPage.ts
|
||||
#: src/pages/users/RelatedUserList.ts
|
||||
|
@ -2767,6 +2768,10 @@ msgstr "Mode de l'émetteur"
|
|||
msgid "JSON Web Key URL. Keys from the URL will be used to validate JWTs from this source."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
msgid "JWKS URL"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderForm.ts
|
||||
#~ msgid "JWT Algorithm"
|
||||
#~ msgstr "Algorithme JWT"
|
||||
|
|
|
@ -49,6 +49,7 @@ msgstr "(Format: hours=1;minutes=2;seconds=3)."
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts
|
||||
#: src/pages/tokens/TokenListPage.ts
|
||||
#: src/pages/users/RelatedUserList.ts
|
||||
|
@ -2735,6 +2736,10 @@ msgstr "Tryb wystawcy"
|
|||
msgid "JSON Web Key URL. Keys from the URL will be used to validate JWTs from this source."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
msgid "JWKS URL"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "JWT Algorithm"
|
||||
#~ msgstr "Algorytm JWT"
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ msgstr ""
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts
|
||||
#: src/pages/tokens/TokenListPage.ts
|
||||
#: src/pages/users/RelatedUserList.ts
|
||||
|
@ -2776,6 +2777,10 @@ msgstr ""
|
|||
msgid "JSON Web Key URL. Keys from the URL will be used to validate JWTs from this source."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
msgid "JWKS URL"
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderForm.ts
|
||||
#~ msgid "JWT Algorithm"
|
||||
#~ msgstr ""
|
||||
|
|
|
@ -49,6 +49,7 @@ msgstr "(Biçim: saat=1; dakika=2; saniye= 3)."
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts
|
||||
#: src/pages/tokens/TokenListPage.ts
|
||||
#: src/pages/users/RelatedUserList.ts
|
||||
|
@ -2739,6 +2740,10 @@ msgstr "Yayımcı kipi"
|
|||
msgid "JSON Web Key URL. Keys from the URL will be used to validate JWTs from this source."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
msgid "JWKS URL"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "JWT Algorithm"
|
||||
#~ msgstr "JWT Algoritması"
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ msgstr "(格式:hours=1;minutes=2;seconds=3)。"
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts
|
||||
#: src/pages/tokens/TokenListPage.ts
|
||||
#: src/pages/users/RelatedUserList.ts
|
||||
|
@ -2723,6 +2724,10 @@ msgstr "Issuer 模式"
|
|||
msgid "JSON Web Key URL. Keys from the URL will be used to validate JWTs from this source."
|
||||
msgstr "JSON Web Key URL。来自此 URL 的 Key 将被用于验证此身份来源的 JWT。"
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
msgid "JWKS URL"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "JWT Algorithm"
|
||||
#~ msgstr "JWT 算法"
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ msgstr "(格式: hours=1;minutes=2;seconds=3)."
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts
|
||||
#: src/pages/tokens/TokenListPage.ts
|
||||
#: src/pages/users/RelatedUserList.ts
|
||||
|
@ -2726,6 +2727,10 @@ msgstr "Issuer mode"
|
|||
msgid "JSON Web Key URL. Keys from the URL will be used to validate JWTs from this source."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
msgid "JWKS URL"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "JWT Algorithm"
|
||||
#~ msgstr "JWT 算法"
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ msgstr "(格式: hours=1;minutes=2;seconds=3)."
|
|||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
#: src/pages/stages/invitation/InvitationListPage.ts
|
||||
#: src/pages/tokens/TokenListPage.ts
|
||||
#: src/pages/users/RelatedUserList.ts
|
||||
|
@ -2726,6 +2727,10 @@ msgstr "Issuer mode"
|
|||
msgid "JSON Web Key URL. Keys from the URL will be used to validate JWTs from this source."
|
||||
msgstr ""
|
||||
|
||||
#: src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
|
||||
msgid "JWKS URL"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "JWT Algorithm"
|
||||
#~ msgstr "JWT 算法"
|
||||
|
||||
|
|
|
@ -256,6 +256,19 @@ export class OAuth2ProviderViewPage extends LitElement {
|
|||
value="${this.providerUrls?.logout || t`-`}"
|
||||
/>
|
||||
</div>
|
||||
<div class="pf-c-form__group">
|
||||
<label class="pf-c-form__label">
|
||||
<span class="pf-c-form__label-text"
|
||||
>${t`JWKS URL`}</span
|
||||
>
|
||||
</label>
|
||||
<input
|
||||
class="pf-c-form-control"
|
||||
readonly
|
||||
type="text"
|
||||
value="${this.providerUrls?.jwks || t`-`}"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in a new issue