Skip to content

Commit 9592ebe

Browse files
committed
Add subject-id signal constant + enum
1 parent 8cda24f commit 9592ebe

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

src/Constants.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ class Constants extends \SimpleSAML\XMLSecurity\Constants
3636
*/
3737
public const ATTR_SUBJECT_ID = 'urn:oasis:names:tc:SAML:attribute:subject-id';
3838

39+
/**
40+
* Subject signal attribute
41+
*/
42+
public const PROFILE_SUBJECT_ID_REQ = 'urn:oasis:names:tc:SAML:profiles:subject-id:req';
43+
3944
/**
4045
* The URN for the Holder-of-Key Web Browser SSO Profile binding
4146
*/

src/XML/subjectid/SignalEnum.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SimpleSAML\SAML2\XML\subjectid;
6+
7+
enum SignalEnum: string
8+
{
9+
/**
10+
* The value MUST be one of the following, signaling the corresponding requirement:
11+
*/
12+
13+
/**
14+
* The relying party requires the standard identifier Attribute defined in Section 3.3.
15+
*
16+
* - subject-id
17+
*/
18+
case SUBJECT_ID = 'subject-id';
19+
20+
/**
21+
* The relying party requires the pair-wise identifier Attribute defined in Section 3.4.
22+
*
23+
* - pairwise-id
24+
*/
25+
case PAIRWISE_ID = 'pairwise-id';
26+
27+
/**
28+
* The relying party does not require any subject identifier and is designed to operate without a
29+
* specific user identity (e.g., with authorization based on non-identifying data).
30+
*
31+
* - none
32+
*/
33+
case NONE = 'none';
34+
35+
/**
36+
* The relying party will accept any of the identifier Attributes defined in this profile but requires at least one.
37+
*
38+
* - any
39+
*/
40+
case ANY = 'any';
41+
}

0 commit comments

Comments
 (0)