@@ -26,15 +26,15 @@ public function __construct(
2626 * @throws \SimpleSAML\OpenID\Exceptions\InvalidValueException
2727 */
2828 public function buildTrustMarksClaimValue (
29- mixed $ trustMarkId ,
29+ mixed $ trustMarkType ,
3030 mixed $ trustMark ,
3131 mixed $ otherClaims = [],
3232 ): TrustMarksClaimValue {
33- $ trustMarkId = $ this ->helpers ->type ()->ensureNonEmptyString ($ trustMarkId );
33+ $ trustMarkType = $ this ->helpers ->type ()->ensureNonEmptyString ($ trustMarkType );
3434 $ trustMark = $ this ->helpers ->type ()->ensureNonEmptyString ($ trustMark );
3535 $ otherClaims = $ this ->helpers ->type ()->ensureArrayWithKeysAsNonEmptyStrings ($ otherClaims );
3636
37- return new TrustMarksClaimValue ($ trustMarkId , $ trustMark , $ otherClaims );
37+ return new TrustMarksClaimValue ($ trustMarkType , $ trustMark , $ otherClaims );
3838 }
3939
4040 /**
@@ -47,12 +47,12 @@ public function buildTrustMarksClaimValueFrom(mixed $trustMarksClaimData): Trust
4747 $ trustMarksClaimData = $ this ->helpers ->type ()->ensureArray ($ trustMarksClaimData );
4848
4949 // Each JSON object MUST contain the following two claims and MAY contain other claims.
50- // trust_mark_id
51- // The Trust Mark identifier. It MUST be the same value as the id claim contained in the Trust Mark JWT.
50+ // trust_mark_type
51+ // The Trust Mark Type identifier. It MUST be the same value as the id claim contained in the Trust Mark JWT.
5252 // trust_mark
5353 // A signed JSON Web Token that represents a Trust Mark.
54- $ trustMarkId = $ trustMarksClaimData [ClaimsEnum::TrustMarkId ->value ] ?? throw new TrustMarkException (
55- 'No ID present in Trust Mark claim. ' ,
54+ $ trustMarkType = $ trustMarksClaimData [ClaimsEnum::TrustMarkType ->value ] ?? throw new TrustMarkException (
55+ 'No type present in Trust Mark claim. ' ,
5656 );
5757
5858 $ trustMark = $ trustMarksClaimData [ClaimsEnum::TrustMark->value ] ?? throw new TrustMarkException (
@@ -61,11 +61,11 @@ public function buildTrustMarksClaimValueFrom(mixed $trustMarksClaimData): Trust
6161
6262 $ otherClaims = array_diff_key (
6363 $ trustMarksClaimData ,
64- [ClaimsEnum::TrustMarkId ->value => true , ClaimsEnum::TrustMark->value => true ],
64+ [ClaimsEnum::TrustMarkType ->value => true , ClaimsEnum::TrustMark->value => true ],
6565 );
6666
6767 return $ this ->buildTrustMarksClaimValue (
68- $ trustMarkId ,
68+ $ trustMarkType ,
6969 $ trustMark ,
7070 $ otherClaims ,
7171 );
@@ -77,18 +77,18 @@ public function buildTrustMarksClaimBag(TrustMarksClaimValue ...$trustMarksClaim
7777 }
7878
7979 public function buildTrustMarkOwnersClaimValue (
80- mixed $ trustMarkId ,
80+ mixed $ trustMarkType ,
8181 mixed $ subject ,
8282 mixed $ jwks ,
8383 mixed $ otherClaims = [],
8484 ): TrustMarkOwnersClaimValue {
85- $ trustMarkId = $ this ->helpers ->type ()->ensureNonEmptyString ($ trustMarkId );
85+ $ trustMarkType = $ this ->helpers ->type ()->ensureNonEmptyString ($ trustMarkType );
8686 $ subject = $ this ->helpers ->type ()->ensureNonEmptyString ($ subject );
8787 $ jwksClaim = $ this ->claimFactory ->buildJwks ($ jwks );
8888 $ otherClaims = $ this ->helpers ->type ()->ensureArrayWithKeysAsNonEmptyStrings ($ otherClaims );
8989
9090 return new TrustMarkOwnersClaimValue (
91- $ trustMarkId ,
91+ $ trustMarkType ,
9292 $ subject ,
9393 $ jwksClaim ,
9494 $ otherClaims ,
@@ -105,7 +105,7 @@ public function buildTrustMarkOwnersClaimBagFrom(mixed $trustMarkOwnersClaimData
105105
106106 $ trustMarkOwnersClaimValues = [];
107107
108- // It is a JSON object with member names that are Trust Mark identifiers and each corresponding value
108+ // It is a JSON object with member names that are Trust Mark Type identifiers and each corresponding value
109109 // being a JSON object with these members:
110110 // sub
111111 // REQUIRED Identifier of the Trust Mark Owner.
@@ -114,7 +114,7 @@ public function buildTrustMarkOwnersClaimBagFrom(mixed $trustMarkOwnersClaimData
114114 // for signing.
115115 // Other members MAY also be defined and used.
116116
117- foreach ($ trustMarkOwnersClaimData as $ trustMarkId => $ trustMarkOwnersClaim ) {
117+ foreach ($ trustMarkOwnersClaimData as $ trustMarkType => $ trustMarkOwnersClaim ) {
118118 $ trustMarkOwnersClaim = $ this ->helpers ->type ()->ensureArray ($ trustMarkOwnersClaim );
119119
120120
@@ -127,11 +127,11 @@ public function buildTrustMarkOwnersClaimBagFrom(mixed $trustMarkOwnersClaimData
127127
128128 $ otherClaims = array_diff_key (
129129 $ trustMarkOwnersClaim ,
130- [ClaimsEnum::TrustMarkId ->value => true , ClaimsEnum::TrustMark->value => true ],
130+ [ClaimsEnum::TrustMarkType ->value => true , ClaimsEnum::TrustMark->value => true ],
131131 );
132132
133133 $ trustMarkOwnersClaimValues [] = $ this ->buildTrustMarkOwnersClaimValue (
134- $ trustMarkId ,
134+ $ trustMarkType ,
135135 $ subject ,
136136 $ jwks ,
137137 $ otherClaims ,
0 commit comments