Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
284d566c
Commit
284d566c
authored
Apr 15, 2016
by
michael.simon
Browse files
Support SAML Attribute Values without excplicit xsi:type.
#43
parent
25257b11
Changes
1
Hide whitespace changes
Inline
Side-by-side
bwreg-service/src/main/java/edu/kit/scc/webreg/service/saml/SamlHelper.java
View file @
284d566c
...
...
@@ -39,6 +39,7 @@ import org.opensaml.xml.io.UnmarshallerFactory;
import
org.opensaml.xml.io.UnmarshallingException
;
import
org.opensaml.xml.parse.BasicParserPool
;
import
org.opensaml.xml.parse.XMLParserException
;
import
org.opensaml.xml.schema.XSAny
;
import
org.opensaml.xml.schema.XSDateTime
;
import
org.opensaml.xml.schema.XSString
;
import
org.opensaml.xml.util.XMLHelper
;
...
...
@@ -133,6 +134,19 @@ public class SamlHelper implements Serializable {
else
if
(
obj
instanceof
XSDateTime
)
{
returnList
.
add
(((
XSDateTime
)
obj
).
getValue
());
}
/*
* Support Attributes with no encoded type. They come as XSAny.
* Assume it's a string
*/
else
if
(
obj
instanceof
XSAny
)
{
XSAny
any
=
(
XSAny
)
obj
;
if
(
any
.
getTextContent
()
!=
null
)
{
returnList
.
add
(
any
.
getTextContent
().
trim
());
}
}
else
{
logger
.
info
(
"Unknown Attribute type: {}"
,
obj
.
getClass
());
}
}
}
return
returnList
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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