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