Merge pull request #431 from mposolda/master
Change default timeouts for testrealm.json bundled in examples, Fix admin-access-app example
This commit is contained in:
commit
fe236cabd3
5 changed files with 14 additions and 12 deletions
|
@ -2,7 +2,7 @@
|
||||||
<title>Master Admin Access Control</title>
|
<title>Master Admin Access Control</title>
|
||||||
<para>
|
<para>
|
||||||
You can create and manage multiple realms by logging into the <literal>master</literal> Keycloak admin console
|
You can create and manage multiple realms by logging into the <literal>master</literal> Keycloak admin console
|
||||||
at <literal>/{keycloak-root/admin/index.html</literal>
|
at <literal>/{keycloak-root}/admin/index.html</literal>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Users in the Keycloak <literal>master</literal> realm can be granted permission to manage zero or more realms that are
|
Users in the Keycloak <literal>master</literal> realm can be granted permission to manage zero or more realms that are
|
||||||
|
|
|
@ -8,19 +8,14 @@ import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||||
import org.apache.http.client.methods.HttpGet;
|
import org.apache.http.client.methods.HttpGet;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.http.client.methods.HttpPost;
|
||||||
import org.apache.http.message.BasicNameValuePair;
|
import org.apache.http.message.BasicNameValuePair;
|
||||||
import org.keycloak.KeycloakSecurityContext;
|
|
||||||
import org.keycloak.OAuth2Constants;
|
import org.keycloak.OAuth2Constants;
|
||||||
import org.keycloak.ServiceUrlConstants;
|
import org.keycloak.ServiceUrlConstants;
|
||||||
import org.keycloak.adapters.HttpClientBuilder;
|
import org.keycloak.adapters.HttpClientBuilder;
|
||||||
import org.keycloak.representations.AccessTokenResponse;
|
import org.keycloak.representations.AccessTokenResponse;
|
||||||
import org.keycloak.representations.IDToken;
|
|
||||||
import org.keycloak.representations.idm.CredentialRepresentation;
|
|
||||||
import org.keycloak.representations.idm.RoleRepresentation;
|
import org.keycloak.representations.idm.RoleRepresentation;
|
||||||
import org.keycloak.util.BasicAuthHelper;
|
|
||||||
import org.keycloak.util.JsonSerialization;
|
import org.keycloak.util.JsonSerialization;
|
||||||
import org.keycloak.util.KeycloakUriBuilder;
|
import org.keycloak.util.KeycloakUriBuilder;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
@ -107,8 +102,8 @@ public class AdminClient {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
HttpGet get = new HttpGet(KeycloakUriBuilder.fromUri("http://localhost:8080/auth")
|
HttpGet get = new HttpGet(KeycloakUriBuilder.fromUri("http://localhost:8080/auth")
|
||||||
.path(ServiceUrlConstants.TOKEN_SERVICE_LOGIN_PATH)
|
.path(ServiceUrlConstants.TOKEN_SERVICE_LOGOUT_PATH)
|
||||||
.queryParam("session-state", res.getSessionState())
|
.queryParam("session_state", res.getSessionState())
|
||||||
.build("demo"));
|
.build("demo"));
|
||||||
HttpResponse response = client.execute(get);
|
HttpResponse response = client.execute(get);
|
||||||
HttpEntity entity = response.getEntity();
|
HttpEntity entity = response.getEntity();
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Refresh" content="0; URL=admin/admin.jsp">
|
||||||
|
</head>
|
||||||
|
</html>
|
|
@ -1,9 +1,11 @@
|
||||||
{
|
{
|
||||||
"realm": "demo",
|
"realm": "demo",
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"accessTokenLifespan": 3000,
|
"accessTokenLifespan": 60,
|
||||||
"accessCodeLifespan": 10,
|
"accessCodeLifespan": 60,
|
||||||
"accessCodeLifespanUserAction": 6000,
|
"accessCodeLifespanUserAction": 300,
|
||||||
|
"ssoSessionIdleTimeout": 600,
|
||||||
|
"ssoSessionMaxLifespan": 36000,
|
||||||
"passwordCredentialGrantAllowed": true,
|
"passwordCredentialGrantAllowed": true,
|
||||||
"sslNotRequired": true,
|
"sslNotRequired": true,
|
||||||
"registrationAllowed": false,
|
"registrationAllowed": false,
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="passwordCredentialGrantAllowed" class="col-sm-2 control-label">Direct Grant API</label>
|
<label for="passwordCredentialGrantAllowed" class="col-sm-2 control-label">Direct Grant API</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<input ng-model="realm.passwordCredentialGrantAllowedpasswordCredentialGrantAllowed" name="passwordCredentialGrantAllowed" id="passwordCredentialGrantAllowed" onoffswitch />
|
<input ng-model="realm.passwordCredentialGrantAllowed" name="passwordCredentialGrantAllowed" id="passwordCredentialGrantAllowed" onoffswitch />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
Loading…
Reference in a new issue