response presentation without promotion
This commit is contained in:
parent
c9933a0ab6
commit
29b3677da2
72
oidc4vp/templates/received_code.html
Normal file
72
oidc4vp/templates/received_code.html
Normal file
|
@ -0,0 +1,72 @@
|
|||
|
||||
{% load i18n static %}
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="NONE,NOARCHIVE" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Pangea">
|
||||
<title>{% block title %}{% if title %}{{ title }} – {% endif %}Pangea{% endblock %}</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href= "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
|
||||
<link href="{% static "/css/bootstrap.min.css" %}" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
.bd-placeholder-img {
|
||||
font-size: 1.125rem;
|
||||
text-anchor: middle;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.bd-placeholder-img-lg {
|
||||
font-size: 3.5rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="{% static "/css/dashboard.css" %}" rel="stylesheet">
|
||||
</head>
|
||||
<body id="body-login">
|
||||
<header class="navbar navbar-dark sticky-top bg-grey flex-md-nowrap p-0 shadow" style="background-color: #712547;">
|
||||
<div class="navbar-nav navbar-sub-brand">
|
||||
</div>
|
||||
<div class="navbar-nav">
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<main class="col-md-12 bt-5">
|
||||
|
||||
<div class="jumbotron vertical-center">
|
||||
<div id="login-wrapper" class="container" style="width: 430px;">
|
||||
<div id="login-content" class="rounded">
|
||||
<div id="login-branding">
|
||||
</div><!-- /login-branding -->
|
||||
<div class="mt-5">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{% trans 'Thank you, we are received your presentation correctly.' %}
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.row-fluid -->
|
||||
</div>
|
||||
<!--/#login-content-->
|
||||
</div><!-- /#login-wrapper -->
|
||||
</div><!-- /.jumbotron -->
|
||||
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -13,4 +13,6 @@ urlpatterns = [
|
|||
name="authorize"),
|
||||
path('allow_code', views.AllowCodeView.as_view(),
|
||||
name="allow_code"),
|
||||
path('received_code', views.ReceivedCodeView.as_view(),
|
||||
name="received_code"),
|
||||
]
|
||||
|
|
|
@ -235,7 +235,17 @@ class AllowCodeView(View):
|
|||
|
||||
promotion = self.authorization.promotions.first()
|
||||
if not promotion:
|
||||
raise Http404("Page not Found!")
|
||||
return redirect(reverse_lazy('oidc4vp:received_code'))
|
||||
|
||||
return redirect(promotion.get_url(code))
|
||||
|
||||
|
||||
class ReceivedCodeView(View):
|
||||
template_name = "received_code.html"
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
self.context = {}
|
||||
template = loader.get_template(
|
||||
self.template_name,
|
||||
).render()
|
||||
return HttpResponse(template)
|
||||
|
|
Loading…
Reference in a new issue