Commit 3a19f669 authored by michael.simon's avatar michael.simon
Browse files

check assertion for null

parent b04dafd6
...@@ -258,6 +258,7 @@ public class UserUpdater implements Serializable { ...@@ -258,6 +258,7 @@ public class UserUpdater implements Serializable {
public SamlUserEntity updateUser(SamlUserEntity user, Assertion assertion, String executor, ServiceEntity service) public SamlUserEntity updateUser(SamlUserEntity user, Assertion assertion, String executor, ServiceEntity service)
throws UserUpdateException { throws UserUpdateException {
if (assertion != null) {
samlAsserionDao.deleteAssertionForUser(user); samlAsserionDao.deleteAssertionForUser(user);
SamlAssertionEntity samlAssertionEntity = samlAsserionDao.createNew(); SamlAssertionEntity samlAssertionEntity = samlAsserionDao.createNew();
...@@ -265,6 +266,7 @@ public class UserUpdater implements Serializable { ...@@ -265,6 +266,7 @@ public class UserUpdater implements Serializable {
samlAssertionEntity.setAssertionData(samlHelper.prettyPrint(assertion)); samlAssertionEntity.setAssertionData(samlHelper.prettyPrint(assertion));
samlAssertionEntity.setValidUntil(new Date(System.currentTimeMillis() + (4L * 60L * 60L * 1000L))); samlAssertionEntity.setValidUntil(new Date(System.currentTimeMillis() + (4L * 60L * 60L * 1000L)));
samlAssertionEntity = samlAsserionDao.persist(samlAssertionEntity); samlAssertionEntity = samlAsserionDao.persist(samlAssertionEntity);
}
Map<String, List<Object>> attributeMap = saml2AssertionService.extractAttributes(assertion); Map<String, List<Object>> attributeMap = saml2AssertionService.extractAttributes(assertion);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment