providers/oauth2: add more info to configuration modal

This commit is contained in:
Jens Langhammer 2020-09-19 00:31:57 +02:00
parent ddca46e24a
commit 5a3c1137ab
2 changed files with 15 additions and 9 deletions

View File

@ -293,6 +293,7 @@ class OAuth2Provider(Provider):
"providers/oauth2/setup_url_modal.html",
{
"provider": self,
"issuer": self.get_issuer(request),
"authorize": request.build_absolute_uri(
reverse("passbook_providers_oauth2:authorize",)
),
@ -339,7 +340,6 @@ class BaseGrantModel(models.Model):
abstract = True
# pylint: disable=too-many-instance-attributes
class AuthorizationCode(ExpiringModel, BaseGrantModel):
"""OAuth2 Authorization Code"""
@ -366,7 +366,7 @@ class AuthorizationCode(ExpiringModel, BaseGrantModel):
@dataclass
# plyint: disable=too-many-instance-attributes
# pylint: disable=too-many-instance-attributes
class IDToken:
"""The primary extension that OpenID Connect makes to OAuth 2.0 to enable End-Users to be
Authenticated is the ID Token data structure. The ID Token is a security token that contains

View File

@ -13,6 +13,19 @@
</div>
<div class="pf-c-modal-box__body" id="modal-description">
<form class="pf-c-form">
<div class="pf-c-form__group">
<label class="pf-c-form__label" for="help-text-simple-form-name">
<span class="pf-c-form__label-text">{% trans 'OpenID Configuration URL' %}</span>
</label>
<input class="pf-c-form-control" readonly type="text" value="{{ provider_info }}" />
</div>
<div class="pf-c-form__group">
<label class="pf-c-form__label" for="help-text-simple-form-name">
<span class="pf-c-form__label-text">{% trans 'OpenID Configuration Issuer' %}</span>
</label>
<input class="pf-c-form-control" readonly type="text" value="{{ issuer }}" />
</div>
<hr>
<div class="pf-c-form__group">
<label class="pf-c-form__label" for="help-text-simple-form-name">
<span class="pf-c-form__label-text">{% trans 'Authorize URL' %}</span>
@ -31,13 +44,6 @@
</label>
<input class="pf-c-form-control" readonly type="text" value="{{ userinfo }}" />
</div>
<hr>
<div class="pf-c-form__group">
<label class="pf-c-form__label" for="help-text-simple-form-name">
<span class="pf-c-form__label-text">{% trans 'OpenID Configuration URL' %}</span>
</label>
<input class="pf-c-form-control" readonly type="text" value="{{ provider_info }}" />
</div>
</form>
</div>
<footer class="pf-c-modal-box__footer pf-m-align-left">