Skip to content

Commit a62384d

Browse files
committed
Update specs
1 parent 8ffa945 commit a62384d

9 files changed

Lines changed: 1834 additions & 41 deletions

File tree

specifications/update-specs.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@ then
1010
fi
1111

1212
URLS=(
13+
# OpenID specifications
1314
"https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html"
1415
"https://openid.net/specs/openid-federation-1_0.html"
15-
"https://www.w3.org/TR/vc-data-model-2.0/"
16-
"https://www.w3.org/TR/vc-jose-cose/"
17-
"https://fidescommunity.github.io/DIIP/"
1816
"https://openid.net/specs/openid-connect-core-1_0.html"
1917
"https://openid.net/specs/openid-connect-discovery-1_0.html"
2018
"https://openid.net/specs/openid-connect-rpinitiated-1_0.html"
2119
"https://openid.net/specs/openid-connect-frontchannel-1_0.html"
2220
"https://openid.net/specs/openid-connect-backchannel-1_0.html"
21+
# W3C specifications
22+
"https://www.w3.org/TR/vc-data-model-2.0/"
23+
"https://www.w3.org/TR/vc-jose-cose/"
24+
"https://www.w3.org/TR/vc-imp-guide/"
25+
# DIIP specifications
26+
"https://fidescommunity.github.io/DIIP/"
2327
)
2428

2529
# For each of the specifications, fetch the content from the URL and save it

specifications/vc-imp-guide.md

Lines changed: 948 additions & 0 deletions
Large diffs are not rendered by default.

src/Codebooks/ClaimsEnum.php

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,38 @@ enum ClaimsEnum: string
99
// _SelectiveDisclosure
1010
case _Sd = '_sd';
1111

12-
// _SelectiveDisclosureAlgorithm
12+
// _SelectiveDisclosureAlgorithm
1313
case _SdAlg = '_sd_alg';
1414

15-
// @context
15+
// @context
1616
case AtContext = '@context';
1717

18-
// @type
18+
// @type
1919
case AtType = '@type';
2020

21-
// Authentication Context Class Reference
21+
// Authentication Context Class Reference
2222
case Acr = 'acr';
2323

2424
case AcrValuesSupported = 'acr_values_supported';
2525

26-
// Algorithm
26+
// Algorithm
2727
case Alg = 'alg';
2828

29-
// AlgorithmValuesSupported
29+
// AlgorithmValuesSupported
3030
case AlgValuesSupported = 'alg_values_supported';
3131

32-
// AlternativeText
32+
// AlternativeText
3333
case AltText = 'alt_text';
3434

35-
// Authentication Methods References
35+
// Authentication Methods References
3636
case Amr = 'amr';
3737

3838
case ApplicationType = 'application_type';
3939

40-
// Access Token hash
40+
// Access Token hash
4141
case ATHash = 'at_hash';
4242

43-
// Audience
43+
// Audience
4444
case Aud = 'aud';
4545

4646
case AuthTime = 'auth_time';
@@ -53,7 +53,7 @@ enum ClaimsEnum: string
5353

5454
case AuthorizationServers = 'authorization_servers';
5555

56-
// Authorized party
56+
// Authorized party
5757
case Azp = 'azp';
5858

5959
case BackChannelLogoutSessionSupported = 'backchannel_logout_session_supported';
@@ -70,7 +70,7 @@ enum ClaimsEnum: string
7070

7171
case BatchSize = 'batch_size';
7272

73-
// Code hash
73+
// Code hash
7474
case CHash = 'c_hash';
7575

7676
case ClaimTypesSupported = 'claim_types_supported';
@@ -93,7 +93,7 @@ enum ClaimsEnum: string
9393

9494
case ClientUri = 'client_uri';
9595

96-
// Confirmation
96+
// Confirmation
9797
case Cnf = 'cnf';
9898

9999
case CodeChallengeMethodsSupported = 'code_challenge_methods_supported';
@@ -122,7 +122,7 @@ enum ClaimsEnum: string
122122

123123
case Credential_Schema = 'credentialSchema';
124124

125-
// CredentialSigningAlgorithmValuesSupported
125+
// CredentialSigningAlgorithmValuesSupported
126126
case CredentialSigningAlgValuesSupported = 'credential_signing_alg_values_supported';
127127

128128
case Credential_Status = 'credentialStatus';
@@ -155,14 +155,14 @@ enum ClaimsEnum: string
155155

156156
case EncryptionRequired = 'encryption_required';
157157

158-
// EncryptionValuesSupported
158+
// EncryptionValuesSupported
159159
case EncValuesSupported = 'enc_values_supported';
160160

161161
case Events = 'events';
162162

163163
case Evidence = 'evidence';
164164

165-
// ExpirationTime
165+
// ExpirationTime
166166
case Exp = 'exp';
167167

168168
case Expiration_Date = 'expirationDate';
@@ -185,10 +185,10 @@ enum ClaimsEnum: string
185185

186186
case HomepageUri = 'homepage_uri';
187187

188-
// IssuedAt
188+
// IssuedAt
189189
case Iat = 'iat';
190190

191-
// Identifier
191+
// Identifier
192192
case Id = 'id';
193193

194194
case InputMode = 'input_mode';
@@ -216,7 +216,7 @@ enum ClaimsEnum: string
216216
case IntrospectionEndpointAuthSigningAlgValuesSupported =
217217
'introspection_endpoint_auth_signing_alg_values_supported';
218218

219-
// Issuer
219+
// Issuer
220220
case Iss = 'iss';
221221

222222
case Issuance_Date = 'issuanceDate';
@@ -225,20 +225,20 @@ enum ClaimsEnum: string
225225

226226
case IssuerState = 'issuer_state';
227227

228-
// JWT ID
228+
// JWT ID
229229
case Jti = 'jti';
230230

231-
// JsonWebKey
231+
// JsonWebKey
232232
case Jwk = 'jwk';
233233

234-
// JsonWebKeySet
234+
// JsonWebKeySet
235235
case Jwks = 'jwks';
236236

237237
case JwksUri = 'jwks_uri';
238238

239239
case Keywords = 'keywords';
240240

241-
// KeyId
241+
// KeyId
242242
case Kid = 'kid';
243243

244244
case KeyAttestationsRequired = 'key_attestations_required';
@@ -261,7 +261,7 @@ enum ClaimsEnum: string
261261

262262
case MetadataPolicy = 'metadata_policy';
263263

264-
// MetadataPolicyCritical
264+
// MetadataPolicyCritical
265265
case MetadataPolicyCrit = 'metadata_policy_crit';
266266

267267
case Name = 'name';
@@ -270,17 +270,17 @@ enum ClaimsEnum: string
270270

271271
case NonceEndpoint = 'nonce_endpoint';
272272

273-
// NotBefore
273+
// NotBefore
274274
case Nbf = 'nbf';
275275

276276
case Notification = 'notification';
277277

278278
case NotificationEndpoint = 'notification_endpoint';
279279

280-
// OpenIDProviderPolicyUri
280+
// OpenIDProviderPolicyUri
281281
case OpPolicyUri = 'op_policy_uri';
282282

283-
// OpenIDProviderTermsOfServiceUri
283+
// OpenIDProviderTermsOfServiceUri
284284
case OpTosUri = 'op_tos_uri';
285285

286286
case OrganizationName = 'organization_name';
@@ -303,14 +303,14 @@ enum ClaimsEnum: string
303303

304304
case Proofs = 'proofs';
305305

306-
// ProofSigningAlgorithmValuesSupported
306+
// ProofSigningAlgorithmValuesSupported
307307
case ProofSigningAlgValuesSupported = 'proof_signing_alg_values_supported';
308308

309309
case ProofTypesSupported = 'proof_types_supported';
310310

311311
case RedirectUris = 'redirect_uris';
312312

313-
// Reference
313+
// Reference
314314
case Ref = 'ref';
315315

316316
case Refresh_Service = 'refreshService';
@@ -363,7 +363,7 @@ enum ClaimsEnum: string
363363

364364
case ServiceDocumentation = 'service_documentation';
365365

366-
// Session ID
366+
// Session ID
367367
case Sid = 'sid';
368368

369369
case SignedJwksUri = 'signed_jwks_uri';
@@ -376,10 +376,10 @@ enum ClaimsEnum: string
376376

377377
case Status = 'status';
378378

379-
// Subject
379+
// Subject
380380
case Sub = 'sub';
381381

382-
// Subject JWK
382+
// Subject JWK
383383
case SubJwk = 'sub_jwk';
384384

385385
case SubjectType = 'subject_type';
@@ -402,7 +402,7 @@ enum ClaimsEnum: string
402402

403403
case TosUri = 'tos_uri';
404404

405-
// Type
405+
// Type
406406
case Typ = 'typ';
407407

408408
case Type = 'type';
@@ -421,10 +421,10 @@ enum ClaimsEnum: string
421421

422422
case TrustMarks = 'trust_marks';
423423

424-
// TransactionCode
424+
// TransactionCode
425425
case TxCode = 'tx_code';
426426

427-
// UserInterfaceLocalesSupported
427+
// UserInterfaceLocalesSupported
428428
case UiLocalesSupported = 'ui_locales_supported';
429429

430430
case Uri = 'uri';
@@ -447,12 +447,16 @@ enum ClaimsEnum: string
447447

448448
case UserinfoSigningAlgValuesSupported = 'userinfo_signing_alg_values_supported';
449449

450-
// VerifiableCredential
450+
case ValidFrom = 'validFrom';
451+
452+
case ValidUntil = 'validUntil';
453+
454+
// VerifiableCredential
451455
case Vc = 'vc';
452456

453-
// VerifiableCredentialType
457+
// VerifiableCredentialType
454458
case Vct = 'vct';
455459

456-
// X509certificateChain
460+
// X509certificateChain
457461
case X5c = 'x5c';
458462
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SimpleSAML\OpenID\VerifiableCredentials\VcDataModel2\Claims;
6+
7+
use DateTimeImmutable;
8+
use DateTimeInterface;
9+
use SimpleSAML\OpenID\Codebooks\ClaimsEnum;
10+
use SimpleSAML\OpenID\ValueAbstracts\ClaimInterface;
11+
12+
class ValidFromClaimValue implements ClaimInterface
13+
{
14+
public function __construct(
15+
protected readonly DateTimeImmutable $validFrom,
16+
) {
17+
}
18+
19+
20+
public function getName(): string
21+
{
22+
return ClaimsEnum::ValidFrom->value;
23+
}
24+
25+
26+
public function getValue(): DateTimeImmutable
27+
{
28+
return $this->validFrom;
29+
}
30+
31+
32+
public function jsonSerialize(): string
33+
{
34+
return $this->validFrom->format(DateTimeInterface::ATOM);
35+
}
36+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SimpleSAML\OpenID\VerifiableCredentials\VcDataModel2\Claims;
6+
7+
use DateTimeImmutable;
8+
use DateTimeInterface;
9+
use SimpleSAML\OpenID\Codebooks\ClaimsEnum;
10+
use SimpleSAML\OpenID\ValueAbstracts\ClaimInterface;
11+
12+
class ValidUntilClaimValue implements ClaimInterface
13+
{
14+
public function __construct(
15+
protected readonly DateTimeImmutable $validUntil,
16+
) {
17+
}
18+
19+
20+
public function getName(): string
21+
{
22+
return ClaimsEnum::ValidUntil->value;
23+
}
24+
25+
26+
public function getValue(): DateTimeImmutable
27+
{
28+
return $this->validUntil;
29+
}
30+
31+
32+
public function jsonSerialize(): string
33+
{
34+
return $this->validUntil->format(DateTimeInterface::ATOM);
35+
}
36+
}

0 commit comments

Comments
 (0)