Don't require SSL in KeycloakServer

This commit is contained in:
Stian Thorgersen 2013-10-12 10:57:59 +01:00
parent c5aeb67cb9
commit ad25541ee3

View file

@ -195,22 +195,18 @@ public class KeycloakServer {
} }
RealmModel defaultRealm = manager.createRealm(RealmModel.DEFAULT_REALM, RealmModel.DEFAULT_REALM); RealmModel defaultRealm = manager.createRealm(RealmModel.DEFAULT_REALM, RealmModel.DEFAULT_REALM);
manager.generateRealmKeys(defaultRealm); defaultRealm.setName(RealmModel.DEFAULT_REALM);
defaultRealm.setEnabled(true); defaultRealm.setEnabled(true);
defaultRealm.setTokenLifespan(300); defaultRealm.setTokenLifespan(300);
defaultRealm.setAccessCodeLifespan(60); defaultRealm.setAccessCodeLifespan(60);
defaultRealm.setAccessCodeLifespanUserAction(600); defaultRealm.setAccessCodeLifespanUserAction(600);
defaultRealm.setSslNotRequired(false); defaultRealm.setSslNotRequired(true);
defaultRealm.setCookieLoginAllowed(true); defaultRealm.setCookieLoginAllowed(true);
defaultRealm.setRegistrationAllowed(true); defaultRealm.setRegistrationAllowed(true);
defaultRealm.setAutomaticRegistrationAfterSocialLogin(false); manager.generateRealmKeys(defaultRealm);
defaultRealm.setVerifyEmail(false);
defaultRealm.addRequiredCredential(CredentialRepresentation.PASSWORD); defaultRealm.addRequiredCredential(CredentialRepresentation.PASSWORD);
RoleModel role = defaultRealm.addRole(SaasService.REALM_CREATOR_ROLE); defaultRealm.addRole(SaasService.REALM_CREATOR_ROLE);
UserModel admin = defaultRealm.addUser("admin"); defaultRealm.addDefaultRole(SaasService.REALM_CREATOR_ROLE);
defaultRealm.grantRole(admin, role);
session.getTransaction().commit(); session.getTransaction().commit();
} finally { } finally {