remove cookieLoginAllowed

This commit is contained in:
Bill Burke 2014-01-15 20:31:01 -05:00
parent 894c28c64f
commit b162190c7f
19 changed files with 2 additions and 86 deletions

View file

@ -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) {

View file

@ -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">

View file

@ -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;
}

View file

@ -6,7 +6,6 @@
"accessCodeLifespanUserAction": 6000,
"accountManagement": true,
"sslNotRequired": true,
"cookieLoginAllowed": true,
"registrationAllowed": false,
"social": false,
"automaticRegistrationAfterSocialLogin": false,

View file

@ -6,7 +6,6 @@
"accessCodeLifespanUserAction": 6000,
"accountManagement": true,
"sslNotRequired": true,
"cookieLoginAllowed": true,
"registrationAllowed": false,
"social": false,
"automaticRegistrationAfterSocialLogin": false,

View file

@ -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);

View file

@ -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();

View file

@ -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;
}

View file

@ -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();

View file

@ -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;

View file

@ -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;
}

View file

@ -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);

View file

@ -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());

View file

@ -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));
}
return location.build();
}

View file

@ -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");

View file

@ -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");

View file

@ -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());

View file

@ -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",

View file

@ -6,7 +6,6 @@
"accessCodeLifespan": 600,
"accessCodeLifespanUserAction": 600,
"sslNotRequired": true,
"cookieLoginAllowed": true,
"registrationAllowed": true,
"accountManagement": true,
"resetPasswordAllowed": true,