commit
bce0e0ea90
6 changed files with 16 additions and 3 deletions
|
@ -9,6 +9,12 @@
|
||||||
<listener>
|
<listener>
|
||||||
<listener-class>org.keycloak.example.oauth.Bootstrap</listener-class>
|
<listener-class>org.keycloak.example.oauth.Bootstrap</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
|
|
||||||
|
<error-page>
|
||||||
|
<exception-type>java.lang.RuntimeException</exception-type>
|
||||||
|
<location>/error.jsp</location>
|
||||||
|
</error-page>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<security-constraint>
|
<security-constraint>
|
||||||
<web-resource-collection>
|
<web-resource-collection>
|
||||||
|
|
1
examples/demo-template/third-party/src/main/webapp/error.jsp
vendored
Normal file
1
examples/demo-template/third-party/src/main/webapp/error.jsp
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
An error occurred. Click <a href="index.html"> to try again.
|
|
@ -5,7 +5,7 @@
|
||||||
<#elseif section = "header">
|
<#elseif section = "header">
|
||||||
${msg("loginProfileTitle")}
|
${msg("loginProfileTitle")}
|
||||||
<#elseif section = "form">
|
<#elseif section = "form">
|
||||||
<form id="kc-update-profile-form" class="${properties.kcFormClass!}" action="${url.loginUpdateProfileUrl}" method="post">
|
<form id="kc-update-profile-form" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
|
||||||
<div class="${properties.kcFormGroupClass!} ${messagesPerField.printIfExists('email',properties.kcFormGroupErrorClass!)}">
|
<div class="${properties.kcFormGroupClass!} ${messagesPerField.printIfExists('email',properties.kcFormGroupErrorClass!)}">
|
||||||
<div class="${properties.kcLabelWrapperClass!}">
|
<div class="${properties.kcLabelWrapperClass!}">
|
||||||
<label for="email" class="${properties.kcLabelClass!}">${msg("email")}</label>
|
<label for="email" class="${properties.kcLabelClass!}">${msg("email")}</label>
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<#if application.client.consentRequired>
|
<#if application.client.consentRequired && application.claimsGranted?has_content>
|
||||||
<button type='submit' class='${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!}' id='revoke-${application.client.clientId}' name='clientId' value="${application.client.id}">${msg("revoke")}</button>
|
<button type='submit' class='${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!}' id='revoke-${application.client.clientId}' name='clientId' value="${application.client.id}">${msg("revoke")}</button>
|
||||||
</#if>
|
</#if>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="(key, value) in (user.attributes | filter:search)">
|
<tr ng-repeat="(key, value) in user.attributes">
|
||||||
<td>{{key}}</td>
|
<td>{{key}}</td>
|
||||||
<td><input ng-model="user.attributes[key]" class="form-control" type="text" name="{{key}}" id="attribute-{{key}}" /></td>
|
<td><input ng-model="user.attributes[key]" class="form-control" type="text" name="{{key}}" id="attribute-{{key}}" /></td>
|
||||||
<td class="kc-action-cell">
|
<td class="kc-action-cell">
|
||||||
|
|
|
@ -49,6 +49,7 @@ import org.keycloak.testsuite.pages.OAuthGrantPage;
|
||||||
import org.keycloak.testsuite.rule.KeycloakRule;
|
import org.keycloak.testsuite.rule.KeycloakRule;
|
||||||
import org.keycloak.testsuite.rule.WebResource;
|
import org.keycloak.testsuite.rule.WebResource;
|
||||||
import org.keycloak.testsuite.rule.WebRule;
|
import org.keycloak.testsuite.rule.WebRule;
|
||||||
|
import org.openqa.selenium.By;
|
||||||
import org.openqa.selenium.WebDriver;
|
import org.openqa.selenium.WebDriver;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -130,10 +131,15 @@ public class OAuthGrantTest {
|
||||||
events.expectCodeToToken(codeId, loginEvent.getSessionId()).client("third-party").assertEvent();
|
events.expectCodeToToken(codeId, loginEvent.getSessionId()).client("third-party").assertEvent();
|
||||||
|
|
||||||
accountAppsPage.open();
|
accountAppsPage.open();
|
||||||
|
|
||||||
|
assertEquals(1, driver.findElements(By.id("revoke-third-party")).size());
|
||||||
|
|
||||||
accountAppsPage.revokeGrant("third-party");
|
accountAppsPage.revokeGrant("third-party");
|
||||||
|
|
||||||
events.expect(EventType.REVOKE_GRANT)
|
events.expect(EventType.REVOKE_GRANT)
|
||||||
.client("account").detail(Details.REVOKED_CLIENT, "third-party").assertEvent();
|
.client("account").detail(Details.REVOKED_CLIENT, "third-party").assertEvent();
|
||||||
|
|
||||||
|
assertEquals(0, driver.findElements(By.id("revoke-third-party")).size());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue