Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Commit f0a7ac8

Browse files
committed
1309: A little more hacking to get the Login page to render more then once
1 parent ae4bd06 commit f0a7ac8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

extensions/servlet/src/main/java/com/stormpath/sdk/servlet/mvc/LoginController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,11 @@ public boolean isNotAllowedIfAuthenticated() {
174174
protected void appendModel(HttpServletRequest request, HttpServletResponse response, Form form, List<ErrorModel> errors,
175175
Map<String, Object> model) {
176176

177-
final List<AccountStoreModel> accountStores = accountStoreModelFactory.getAccountStores(request);
177+
// final List<AccountStoreModel> accountStores = accountStoreModelFactory.getAccountStores(request);
178178

179179
// 748: If stormpath.web.idSite.enabled is false and stormpath.web.callback.enabled is false AND
180180
// there are SAML directories mapped to the application, that is a configuration error.
181-
if (!idSiteEnabled && !callbackEnabled && containsSaml(accountStores)) {
181+
if (!idSiteEnabled && !callbackEnabled ) { // && containsSaml(accountStores)) {
182182
String errorMsg = "ID Site is disabled and callbacks are disabled, yet this application has SAML directories. Please enable callbacks or remove SAML directories.";
183183
log.warn(errorMsg);
184184
if (errors == null) {
@@ -190,7 +190,7 @@ protected void appendModel(HttpServletRequest request, HttpServletResponse respo
190190
}
191191
}
192192

193-
model.put("accountStores", accountStores);
193+
// model.put("accountStores", accountStores);
194194

195195
if (isHtmlPreferred(request, response)) {
196196
model.put("forgotPasswordEnabled", forgotPasswordEnabled);

extensions/servlet/src/test/groovy/com/stormpath/sdk/servlet/mvc/LoginControllerTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class LoginControllerTest {
195195

196196
List<AccountStoreModel> accountStores = new ArrayList<AccountStoreModel>()
197197
accountStores.add(new DefaultAccountStoreModel(null, new DefaultProviderModel('foo', 'saml'), null))
198-
expect(accountStoreModelFactory.getAccountStores(request)).andReturn(accountStores)
198+
// expect(accountStoreModelFactory.getAccountStores(request)).andReturn(accountStores)
199199
expect(request.getAttribute(UserAgents.USER_AGENT_REQUEST_ATTRIBUTE_NAME)).andReturn new DefaultUserAgent(request)
200200
expect(request.getParameter("status")).andReturn null
201201
expect(request.getHeader("Accept")).andReturn "text/html"

0 commit comments

Comments
 (0)