Skip to content

Commit

Permalink
Bugfix: resource can be an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Feb 9, 2025
1 parent db1c237 commit eadd95d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

use DOMElement;
use SimpleSAML\Assert\Assert;
use SimpleSAML\SAML11\Type\{AnyURIValue, StringValue};
use SimpleSAML\SAML11\Type\StringValue;
use SimpleSAML\XML\Exception\{
InvalidDOMElementException,
MissingElementException,
SchemaViolationException,
TooManyElementsException,
};
use SimpleSAML\XML\Type\AnyURIValue;

use function strval;

Expand All @@ -26,14 +27,15 @@ abstract class AbstractAuthorizationDecisionStatementType extends AbstractSubjec
/**
* Initialize a saml:AuthorizationDecisionStatementType from scratch
*
* @param \SimpleSAML\SAML11\Type\AnyURIValue $resource
* @param \SimpleSAML\XML\Type\AnyURIValue $resource
* @param \SimpleSAML\SAML11\XML\saml\DecisionTypeEnum $decision
* @param \SimpleSAML\SAML11\XML\saml\Subject $subject
* @param array<\SimpleSAML\SAML11\XML\saml\Action> $action
* @param \SimpleSAML\SAML11\XML\saml\Evidence|null $evidence
*/
final public function __construct(
Subject $subject,
// Uses the base AnyURIValue because the SAML specification allows this attribute to be an empty string
protected AnyURIValue $resource,
protected DecisionTypeEnum $decision,
protected array $action = [],
Expand Down

0 comments on commit eadd95d

Please sign in to comment.