Commit 8b1032c5 authored by Matija Obreza's avatar Matija Obreza

Included OAuth client description and title in the authorization page

parent 825e4148
......@@ -5,39 +5,51 @@
<head>
</head>
<body>
<c:set var="ex" value="${sessionScope['SPRING_SECURITY_LAST_EXCEPTION']}" />
<c:if test="${ex != null}">
<div class="error">
<h2>Oh no!</h2>
<p>Access could not be granted</p>
</div>
</c:if>
<c:set var="ex" value="${sessionScope['SPRING_SECURITY_LAST_EXCEPTION']}" />
<c:if test="${ex != null}">
<div class="error">
<h2>Oh no!</h2>
<p>Access could not be granted</p>
</div>
</c:if>
<c:remove scope="session" var="SPRING_SECURITY_LAST_EXCEPTION" />
<security:authentication var="user" property="principal" />
<c:remove scope="session" var="SPRING_SECURITY_LAST_EXCEPTION" />
<security:authentication var="user" property="principal" />
<security:authorize access="isAuthenticated()">
<h1><spring:message code="oauth2.confirm-request" /></h1>
<p>
<spring:message code="oauth2.confirm-client" arguments="${user.user.name},${client.clientId}" htmlEscape="false" />
</p>
<security:authorize access="isAuthenticated()">
<h1>
<spring:message code="oauth2.confirm-request" />
</h1>
<p>
<spring:message code="oauth2.confirm-client" arguments="${user.user.name},${client.title}" htmlEscape="false" />
</p>
<div class="row">
<div class="col-sm-2">
<form action="<c:url value="/oauth/authorize" />" method="post">
<input name="user_oauth_approval" value="true" type="hidden" /> <label><input class="btn btn-primary" name="authorize" value="<spring:message code="oauth2.button-approve" />" type="submit" /></label>
<!-- CSRF protection -->
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
</form>
</div>
<div class="col-sm-2">
<form action="<c:url value="/oauth/authorize" />" method="post">
<input name="user_oauth_approval" value="false" type="hidden" /> <label><input class="btn btn-default" name="deny" value="<spring:message code="oauth2.button-deny" />" type="submit" /></label>
<!-- CSRF protection -->
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
</form>
</div>
</div>
</security:authorize>
<c:if test="${client.description ne null and client.description.length()>0}">
<div class="free-text" style="margin-bottom: 2em;">
<c:out value="${client.description}" escapeXml="false" />
</div>
</c:if>
<div class="row">
<div class="col-sm-2">
<form action="<c:url value="/oauth/authorize" />" method="post">
<input name="user_oauth_approval" value="true" type="hidden" /> <label><input class="btn btn-primary"
name="authorize" value="<spring:message code="oauth2.button-approve" />" type="submit"
/></label>
<!-- CSRF protection -->
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
</form>
</div>
<div class="col-sm-2">
<form action="<c:url value="/oauth/authorize" />" method="post">
<input name="user_oauth_approval" value="false" type="hidden" /> <label><input
class="btn btn-default" name="deny" value="<spring:message code="oauth2.button-deny" />" type="submit"
/></label>
<!-- CSRF protection -->
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />
</form>
</div>
</div>
</security:authorize>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment