* O-RAN-SC
* %%
* Copyright (C) 2019 AT&T Intellectual Property
+ * Modifications Copyright (C) 2020 Nordix Foundation
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* created and EPService cookie is set.
* </UL>
*
- * TODO: What about sessions? Will this be stateless?
+ * Open question: What about sessions? Will this be stateless?
*
* This filter uses no annotations to avoid Spring's automatic registration,
* which add this filter in the chain in the wrong order.
private final DashboardUserManager userManager;
public PortalAuthenticationFilter(boolean portalSecurity, PortalAuthManager authManager,
- DashboardUserManager userManager) {
+ DashboardUserManager userManager) throws IOException {
this.enforcePortalSecurity = portalSecurity;
this.authManager = authManager;
this.userManager = userManager;
if (in == null) {
String msg = "Failed to find property file on classpath: " + pf;
logger.error(msg);
- throw new RuntimeException(msg);
+ throw new IOException(msg);
} else {
try {
in.close();
String redirectUrl = portalBaseUrl + "?" + PortalAuthenticationFilter.REDIRECT_URL_KEY + "=" + encodedAppUrl;
String aHref = "<a href=\"" + redirectUrl + "\">";
// If only Java had "here" documents.
- String body = String.join(//
+ return String.join(//
System.getProperty("line.separator"), //
"<html>", //
"<head>", //
"</p>", //
"</body>", //
"</html>");
- return body;
}
/**