You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across this situation today where I need to be able allow users to add multiple Attribute Statements to their custom SAML integration with our IDP. For each additional attribute statement, I need to allow the user to be able to set the following:
Name (that will be the Name attribute)
NameFormat (That will be the NameFormat attribute)
Value (That will be the value that goes in to the <saml:AttributeValue> element)
When I took a look at how I could construct the SAMLResponse message for the user's custom SAML integration, I could see no (at least apparent) way to be able to set the NameFormatINDIVIDUALLY on each user defined Attribute Statement.
I see a setter method on the SAML2\Assertion class that looks like this
$this->assertion->setAttributeNameFormat('');
But that method clearly says that it will set the NameFormat for ALL attribute statements. (Those that are all set via an associative array at once). This is not the desired functionality. I dug out the following code block from the SAML2\Assertion class which confirms it. Take a look at this screenshot.
It clearly sets the same NameFormat inside the foreach loop for all statements.
Desired result (solution)
Take a look at the following XML that was generated via a tool which shows the output that I also want.
As you can see, the NameFormats for all 3 statements are different. How could I achieve this desired XML output (SAMLResponse message) ? Any help will be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Description of the problem
I came across this situation today where I need to be able allow users to add multiple Attribute Statements to their custom SAML integration with our IDP. For each additional attribute statement, I need to allow the user to be able to set the following:
Name
attribute)NameFormat
attribute)<saml:AttributeValue>
element)When I took a look at how I could construct the SAMLResponse message for the user's custom SAML integration, I could see no (at least apparent) way to be able to set the
NameFormat
INDIVIDUALLY on each user definedAttribute Statement
.I see a
setter
method on theSAML2\Assertion
class that looks like thisBut that method clearly says that it will set the
NameFormat
for ALL attribute statements. (Those that are all set via an associative array at once). This is not the desired functionality. I dug out the following code block from theSAML2\Assertion
class which confirms it. Take a look at this screenshot.It clearly sets the same
NameFormat
inside theforeach loop
for all statements.Desired result (solution)
Take a look at the following
XML
that was generated via a tool which shows the output that I also want.As you can see, the
NameFormat
s for all 3 statements are different. How could I achieve this desired XML output (SAMLResponse message) ? Any help will be greatly appreciated.The text was updated successfully, but these errors were encountered: