Merge branch 'master' of git.libreccm.org:libreccm_legacy
commit
c45098b06f
|
|
@ -55,15 +55,14 @@ public class SamlLoginModule implements LoginModule {
|
|||
@Override
|
||||
public boolean login() throws LoginException {
|
||||
|
||||
final HttpServletRequest httpRequest = getRequest();
|
||||
final HttpServletResponse httpResponse = getResponse();
|
||||
final HttpServletRequest request = getRequest();
|
||||
final HttpServletResponse response = getResponse();
|
||||
|
||||
final Auth auth;
|
||||
try {
|
||||
auth = new Auth(OneLoginUtil.buildSettings(httpRequest),
|
||||
httpRequest,
|
||||
httpResponse);
|
||||
} catch (SettingsException ex) {
|
||||
auth = new Auth(request, response);
|
||||
} catch (IOException | SettingsException | Error ex) {
|
||||
|
||||
LOGGER.error("SAML Login failed.", ex);
|
||||
throw new LoginException("SAML Login failed. Configuration error?");
|
||||
}
|
||||
|
|
@ -87,10 +86,6 @@ public class SamlLoginModule implements LoginModule {
|
|||
|
||||
@Override
|
||||
public boolean commit() throws LoginException {
|
||||
|
||||
if (userId != null) {
|
||||
subject.getPrincipals().add(new PartyPrincipal(userId));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -101,11 +96,6 @@ public class SamlLoginModule implements LoginModule {
|
|||
|
||||
@Override
|
||||
public boolean logout() throws LoginException {
|
||||
|
||||
getRequest().getSession().invalidate();
|
||||
return true;
|
||||
}
|
||||
|
||||
protected HttpServletRequest getRequest() throws LoginException {
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue