First parts of SAML login module
git-svn-id: https://svn.libreccm.org/ccm/trunk@6167 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
aa8b0a892a
commit
39f5f03a8d
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue