Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
3a19f669
Commit
3a19f669
authored
Nov 20, 2019
by
michael.simon
Browse files
check assertion for null
parent
b04dafd6
Changes
1
Show whitespace changes
Inline
Side-by-side
bwreg-service/src/main/java/edu/kit/scc/webreg/service/impl/UserUpdater.java
View file @
3a19f669
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment