First parts of SAML login module

git-svn-id: https://svn.libreccm.org/ccm/trunk@6167 8810af33-2d31-482b-a856-94f89814c4df
master^2
jensp 2019-08-24 12:48:14 +00:00 committed by Jens Pelzetter
parent 0349d36568
commit 756a29771c
1 changed files with 3 additions and 1 deletions

View File

@ -63,7 +63,7 @@ public class SamlLoginModule implements LoginModule {
auth = new Auth(OneLoginUtil.buildSettings(httpRequest),
httpRequest,
httpResponse);
} catch (IOException | SettingsException | Error ex) {
} catch (SettingsException ex) {
LOGGER.error("SAML Login failed.", ex);
throw new LoginException("SAML Login failed. Configuration error?");
}
@ -87,6 +87,7 @@ public class SamlLoginModule implements LoginModule {
@Override
public boolean commit() throws LoginException {
if (userId != null) {
subject.getPrincipals().add(new PartyPrincipal(userId));
}
@ -100,6 +101,7 @@ public class SamlLoginModule implements LoginModule {
@Override
public boolean logout() throws LoginException {
getRequest().getSession().invalidate();
return true;
}