commit
9143901ec6
20 changed files with 3 additions and 87 deletions
|
@ -147,8 +147,7 @@ module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, $ht
|
|||
if ($scope.createRealm) {
|
||||
$scope.realm = {
|
||||
enabled: true,
|
||||
requireSsl: true,
|
||||
cookieLoginAllowed: true
|
||||
requireSsl: true
|
||||
};
|
||||
} else {
|
||||
if (Current.realm == null || Current.realm.realm != realm.realm) {
|
||||
|
|
|
@ -69,10 +69,6 @@
|
|||
<label for="requireSsl" class="control-label">Require SSL</label>
|
||||
<input ng-model="realm.requireSsl" name="requireSsl" id="requireSsl" onoffswitch />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cookieLoginAllowed" class="control-label">Cookie login allowed</label>
|
||||
<input ng-model="realm.cookieLoginAllowed" name="cookieLoginAllowed" id="cookieLoginAllowed" onoffswitch />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="form-actions" data-ng-show="createRealm">
|
||||
|
|
|
@ -19,7 +19,6 @@ public class RealmRepresentation {
|
|||
protected Boolean enabled;
|
||||
protected Boolean accountManagement;
|
||||
protected Boolean sslNotRequired;
|
||||
protected Boolean cookieLoginAllowed;
|
||||
protected Boolean registrationAllowed;
|
||||
protected Boolean verifyEmail;
|
||||
protected Boolean resetPasswordAllowed;
|
||||
|
@ -124,14 +123,6 @@ public class RealmRepresentation {
|
|||
this.sslNotRequired = sslNotRequired;
|
||||
}
|
||||
|
||||
public Boolean isCookieLoginAllowed() {
|
||||
return cookieLoginAllowed;
|
||||
}
|
||||
|
||||
public void setCookieLoginAllowed(Boolean cookieLoginAllowed) {
|
||||
this.cookieLoginAllowed = cookieLoginAllowed;
|
||||
}
|
||||
|
||||
public Integer getTokenLifespan() {
|
||||
return tokenLifespan;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
"accessCodeLifespanUserAction": 6000,
|
||||
"accountManagement": true,
|
||||
"sslNotRequired": true,
|
||||
"cookieLoginAllowed": true,
|
||||
"registrationAllowed": false,
|
||||
"social": false,
|
||||
"automaticRegistrationAfterSocialLogin": false,
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
"accessCodeLifespanUserAction": 6000,
|
||||
"accountManagement": true,
|
||||
"sslNotRequired": true,
|
||||
"cookieLoginAllowed": true,
|
||||
"registrationAllowed": false,
|
||||
"social": false,
|
||||
"automaticRegistrationAfterSocialLogin": false,
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<ul>
|
||||
<#list oauth.realmRolesRequested as role>
|
||||
<li>
|
||||
<span>${role.description}</span>
|
||||
<span><#if role.description??>${role.description}<#else>${role.name}</#if></span>
|
||||
</li>
|
||||
</#list>
|
||||
|
||||
|
|
|
@ -26,10 +26,6 @@ public interface RealmModel extends RoleContainerModel, RoleMapperModel, ScopeMa
|
|||
|
||||
void setSslNotRequired(boolean sslNotRequired);
|
||||
|
||||
boolean isCookieLoginAllowed();
|
||||
|
||||
void setCookieLoginAllowed(boolean cookieLoginAllowed);
|
||||
|
||||
boolean isRegistrationAllowed();
|
||||
|
||||
void setRegistrationAllowed(boolean registrationAllowed);
|
||||
|
|
|
@ -83,17 +83,6 @@ public class RealmAdapter implements RealmModel {
|
|||
em.flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCookieLoginAllowed() {
|
||||
return realm.isCookieLoginAllowed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCookieLoginAllowed(boolean cookieLoginAllowed) {
|
||||
realm.setCookieLoginAllowed(cookieLoginAllowed);
|
||||
em.flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRegistrationAllowed() {
|
||||
return realm.isRegistrationAllowed();
|
||||
|
|
|
@ -34,7 +34,6 @@ public class RealmEntity {
|
|||
protected String name;
|
||||
protected boolean enabled;
|
||||
protected boolean sslNotRequired;
|
||||
protected boolean cookieLoginAllowed;
|
||||
protected boolean registrationAllowed;
|
||||
protected boolean verifyEmail;
|
||||
protected boolean resetPasswordAllowed;
|
||||
|
@ -118,14 +117,6 @@ public class RealmEntity {
|
|||
this.sslNotRequired = sslNotRequired;
|
||||
}
|
||||
|
||||
public boolean isCookieLoginAllowed() {
|
||||
return cookieLoginAllowed;
|
||||
}
|
||||
|
||||
public void setCookieLoginAllowed(boolean cookieLoginAllowed) {
|
||||
this.cookieLoginAllowed = cookieLoginAllowed;
|
||||
}
|
||||
|
||||
public boolean isRegistrationAllowed() {
|
||||
return registrationAllowed;
|
||||
}
|
||||
|
|
|
@ -146,17 +146,6 @@ public class RealmAdapter implements RealmModel {
|
|||
updateRealm();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCookieLoginAllowed() {
|
||||
return realm.isCookieLoginAllowed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCookieLoginAllowed(boolean cookieLoginAllowed) {
|
||||
realm.setCookieLoginAllowed(cookieLoginAllowed);
|
||||
updateRealm();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRegistrationAllowed() {
|
||||
return realm.isRegistrationAllowed();
|
||||
|
|
|
@ -13,7 +13,6 @@ public class RealmData extends AbstractPartition {
|
|||
private String realmName;
|
||||
private boolean enabled;
|
||||
private boolean sslNotRequired;
|
||||
private boolean cookieLoginAllowed;
|
||||
private boolean registrationAllowed;
|
||||
private boolean verifyEmail;
|
||||
private boolean resetPasswordAllowed;
|
||||
|
@ -81,15 +80,6 @@ public class RealmData extends AbstractPartition {
|
|||
this.sslNotRequired = sslNotRequired;
|
||||
}
|
||||
|
||||
@AttributeProperty
|
||||
public boolean isCookieLoginAllowed() {
|
||||
return cookieLoginAllowed;
|
||||
}
|
||||
|
||||
public void setCookieLoginAllowed(boolean cookieLoginAllowed) {
|
||||
this.cookieLoginAllowed = cookieLoginAllowed;
|
||||
}
|
||||
|
||||
@AttributeProperty
|
||||
public boolean isRegistrationAllowed() {
|
||||
return registrationAllowed;
|
||||
|
|
|
@ -33,8 +33,6 @@ public class RealmEntity implements Serializable {
|
|||
@AttributeValue
|
||||
private boolean sslNotRequired;
|
||||
@AttributeValue
|
||||
private boolean cookieLoginAllowed;
|
||||
@AttributeValue
|
||||
private boolean registrationAllowed;
|
||||
@AttributeValue
|
||||
private boolean verifyEmail;
|
||||
|
@ -98,14 +96,6 @@ public class RealmEntity implements Serializable {
|
|||
this.sslNotRequired = sslNotRequired;
|
||||
}
|
||||
|
||||
public boolean isCookieLoginAllowed() {
|
||||
return cookieLoginAllowed;
|
||||
}
|
||||
|
||||
public void setCookieLoginAllowed(boolean cookieLoginAllowed) {
|
||||
this.cookieLoginAllowed = cookieLoginAllowed;
|
||||
}
|
||||
|
||||
public boolean isRegistrationAllowed() {
|
||||
return registrationAllowed;
|
||||
}
|
||||
|
|
|
@ -52,7 +52,6 @@ public class ApplianceBootstrap {
|
|||
realm.setAccessCodeLifespan(60);
|
||||
realm.setAccessCodeLifespanUserAction(300);
|
||||
realm.setSslNotRequired(true);
|
||||
realm.setCookieLoginAllowed(true);
|
||||
realm.setRegistrationAllowed(false);
|
||||
manager.generateRealmKeys(realm);
|
||||
|
||||
|
|
|
@ -99,7 +99,6 @@ public class RealmManager {
|
|||
}
|
||||
if (rep.isEnabled() != null) realm.setEnabled(rep.isEnabled());
|
||||
if (rep.isSocial() != null) realm.setSocial(rep.isSocial());
|
||||
if (rep.isCookieLoginAllowed() != null) realm.setCookieLoginAllowed(rep.isCookieLoginAllowed());
|
||||
if (rep.isRegistrationAllowed() != null) realm.setRegistrationAllowed(rep.isRegistrationAllowed());
|
||||
if (rep.isVerifyEmail() != null) realm.setVerifyEmail(rep.isVerifyEmail());
|
||||
if (rep.isResetPasswordAllowed() != null) realm.setResetPasswordAllowed(rep.isResetPasswordAllowed());
|
||||
|
@ -198,7 +197,6 @@ public class RealmManager {
|
|||
else newRealm.setAccessCodeLifespanUserAction(300);
|
||||
|
||||
if (rep.isSslNotRequired() != null) newRealm.setSslNotRequired(rep.isSslNotRequired());
|
||||
if (rep.isCookieLoginAllowed() != null) newRealm.setCookieLoginAllowed(rep.isCookieLoginAllowed());
|
||||
if (rep.isRegistrationAllowed() != null) newRealm.setRegistrationAllowed(rep.isRegistrationAllowed());
|
||||
if (rep.isVerifyEmail() != null) newRealm.setVerifyEmail(rep.isVerifyEmail());
|
||||
if (rep.isResetPasswordAllowed() != null) newRealm.setResetPasswordAllowed(rep.isResetPasswordAllowed());
|
||||
|
@ -479,7 +477,6 @@ public class RealmManager {
|
|||
rep.setSocial(realm.isSocial());
|
||||
rep.setAutomaticRegistrationAfterSocialLogin(realm.isAutomaticRegistrationAfterSocialLogin());
|
||||
rep.setSslNotRequired(realm.isSslNotRequired());
|
||||
rep.setCookieLoginAllowed(realm.isCookieLoginAllowed());
|
||||
rep.setPublicKey(realm.getPublicKeyPem());
|
||||
rep.setPrivateKey(realm.getPrivateKeyPem());
|
||||
rep.setRegistrationAllowed(realm.isRegistrationAllowed());
|
||||
|
|
|
@ -73,9 +73,7 @@ public class OAuthFlows {
|
|||
if (state != null)
|
||||
redirectUri.queryParam("state", state);
|
||||
Response.ResponseBuilder location = Response.status(302).location(redirectUri.build());
|
||||
if (realm.isCookieLoginAllowed()) {
|
||||
location.cookie(authManager.createLoginCookie(realm, accessCode.getUser(), uriInfo));
|
||||
}
|
||||
location.cookie(authManager.createLoginCookie(realm, accessCode.getUser(), uriInfo));
|
||||
return location.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,6 @@ public class AuthenticationManagerTest extends AbstractKeycloakTest {
|
|||
super.before();
|
||||
realm = getRealmManager().createRealm("Test");
|
||||
realm.setAccessCodeLifespan(100);
|
||||
realm.setCookieLoginAllowed(true);
|
||||
realm.setEnabled(true);
|
||||
realm.setName("Test");
|
||||
realm.setPrivateKeyPem("0234234");
|
||||
|
|
|
@ -60,7 +60,6 @@ public class AdapterTest extends AbstractKeycloakTest {
|
|||
realmModel = getRealmManager().createRealm("JUGGLER");
|
||||
realmModel.setAccessCodeLifespan(100);
|
||||
realmModel.setAccessCodeLifespanUserAction(600);
|
||||
realmModel.setCookieLoginAllowed(true);
|
||||
realmModel.setEnabled(true);
|
||||
realmModel.setName("JUGGLER");
|
||||
realmModel.setPrivateKeyPem("0234234");
|
||||
|
@ -89,7 +88,6 @@ public class AdapterTest extends AbstractKeycloakTest {
|
|||
realmModel = getRealmManager().createRealm("JUGGLER");
|
||||
realmModel.setAccessCodeLifespan(100);
|
||||
realmModel.setAccessCodeLifespanUserAction(600);
|
||||
realmModel.setCookieLoginAllowed(true);
|
||||
realmModel.setEnabled(true);
|
||||
realmModel.setName("JUGGLER");
|
||||
realmModel.setPrivateKeyPem("0234234");
|
||||
|
|
|
@ -40,7 +40,6 @@ public class ModelTest extends AbstractKeycloakServerTest {
|
|||
@Test
|
||||
public void importExportRealm() {
|
||||
RealmModel realm = manager.createRealm("original");
|
||||
realm.setCookieLoginAllowed(true);
|
||||
realm.setRegistrationAllowed(true);
|
||||
realm.setResetPasswordAllowed(true);
|
||||
realm.setSocial(true);
|
||||
|
@ -74,7 +73,6 @@ public class ModelTest extends AbstractKeycloakServerTest {
|
|||
public static void assertEquals(RealmModel expected, RealmModel actual) {
|
||||
Assert.assertEquals(expected.isAutomaticRegistrationAfterSocialLogin(),
|
||||
actual.isAutomaticRegistrationAfterSocialLogin());
|
||||
Assert.assertEquals(expected.isCookieLoginAllowed(), actual.isCookieLoginAllowed());
|
||||
Assert.assertEquals(expected.isRegistrationAllowed(), actual.isRegistrationAllowed());
|
||||
Assert.assertEquals(expected.isResetPasswordAllowed(), actual.isResetPasswordAllowed());
|
||||
Assert.assertEquals(expected.isSocial(), actual.isSocial());
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
"accessCodeLifespan": 10,
|
||||
"accessCodeLifespanUserAction": 600,
|
||||
"sslNotRequired": true,
|
||||
"cookieLoginAllowed": true,
|
||||
"automaticRegistrationAfterSocialLogin": true,
|
||||
"privateKey": "MIICXAIBAAKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQABAoGAfmO8gVhyBxdqlxmIuglbz8bcjQbhXJLR2EoS8ngTXmN1bo2L90M0mUKSdc7qF10LgETBzqL8jYlQIbt+e6TH8fcEpKCjUlyq0Mf/vVbfZSNaVycY13nTzo27iPyWQHK5NLuJzn1xvxxrUeXI6A2WFpGEBLbHjwpx5WQG9A+2scECQQDvdn9NE75HPTVPxBqsEd2z10TKkl9CZxu10Qby3iQQmWLEJ9LNmy3acvKrE3gMiYNWb6xHPKiIqOR1as7L24aTAkEAtyvQOlCvr5kAjVqrEKXalj0Tzewjweuxc0pskvArTI2Oo070h65GpoIKLc9jf+UA69cRtquwP93aZKtW06U8dQJAF2Y44ks/mK5+eyDqik3koCI08qaC8HYq2wVl7G2QkJ6sbAaILtcvD92ToOvyGyeE0flvmDZxMYlvaZnaQ0lcSQJBAKZU6umJi3/xeEbkJqMfeLclD27XGEFoPeNrmdx0q10Azp4NfJAY+Z8KRyQCR2BEG+oNitBOZ+YXF9KCpH3cdmECQHEigJhYg+ykOvr1aiZUMFT72HU0jnmQe2FVekuG+LJUt2Tm7GtMjTFoGpf0JwrVuZN39fOYAlo+nTixgeW7X8Y=",
|
||||
"publicKey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrVrCuTtArbgaZzL1hvh0xtL5mc7o0NqPVnYXkLvgcwiC3BjLGw1tGEGoJaXDuSaRllobm53JBhjx33UNv+5z/UMG4kytBWxheNVKnL6GgqlNabMaFfPLPCF8kAgKnsi79NMo+n6KnSY8YeUmec/p2vjO2NjsSAVcWEQMVhJ31LwIDAQAB",
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
"accessCodeLifespan": 600,
|
||||
"accessCodeLifespanUserAction": 600,
|
||||
"sslNotRequired": true,
|
||||
"cookieLoginAllowed": true,
|
||||
"registrationAllowed": true,
|
||||
"accountManagement": true,
|
||||
"resetPasswordAllowed": true,
|
||||
|
|
Loading…
Reference in a new issue