Skip to content

Commit 414fb35

Browse files
Add credentialConfigurationId and credentialIdentifier properties to CredentialRequestInfo
1 parent b08abb8 commit 414fb35

1 file changed

Lines changed: 153 additions & 6 deletions

File tree

src/main/java/com/authlete/common/dto/CredentialRequestInfo.java

Lines changed: 153 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023-2024 Authlete, Inc.
2+
* Copyright (C) 2023-2026 Authlete, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
55
* use this file except in compliance with the License. You may obtain a copy of
@@ -32,12 +32,12 @@
3232
* @since 3.66
3333
* @since Authlete 3.0
3434
*
35-
* @see <a href="https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html"
36-
* >OpenID for Verifiable Credential Issuance</a>
35+
* @see <a href="https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html">
36+
* OpenID for Verifiable Credential Issuance 1.0</a>
3737
*/
3838
public class CredentialRequestInfo implements Serializable
3939
{
40-
private static final long serialVersionUID = 2L;
40+
private static final long serialVersionUID = 3L;
4141

4242

4343
/**
@@ -72,6 +72,25 @@ public class CredentialRequestInfo implements Serializable
7272
private String details;
7373

7474

75+
/**
76+
* The {@code credential_configuration_id} parameter in the credential
77+
* request.
78+
*
79+
* @since 4.34
80+
* @since Authlete 3.0.25
81+
*/
82+
private String credentialConfigurationId;
83+
84+
85+
/**
86+
* The {@code credential_identifier} parameter in the credential request.
87+
*
88+
* @since 4.34;
89+
* @since Authlete 3.0.25
90+
*/
91+
private String credentialIdentifier;
92+
93+
7594
/**
7695
* Get the identifier of the credential request.
7796
*
@@ -118,9 +137,18 @@ public CredentialRequestInfo setIdentifier(String identifier)
118137
/**
119138
* Get the value of the {@code format} parameter in the credential request.
120139
*
140+
* <p>
141+
* This {@code format} property is available only when the supported OID4VCI
142+
* specification version is {@code "1.0-ID1"} (i.e., when the Service's
143+
* {@code oid4vciVersion} is unset or set to {@code "1.0-ID1"}) and the
144+
* credential request contains the {@code format} parameter. Note that in
145+
* the final version of the specification, the {@code format} parameter is
146+
* deprecated.
147+
* </p>
148+
*
121149
* @return
122150
* The value of the {@code format} parameter in the credential request.
123-
* Such as {@code "vc+sd-jwt"}.
151+
* Such as {@code "dc+sd-jwt"}.
124152
*/
125153
public String getFormat()
126154
{
@@ -131,9 +159,18 @@ public String getFormat()
131159
/**
132160
* Set the value of the {@code format} parameter in the credential request.
133161
*
162+
* <p>
163+
* This {@code format} property is available only when the supported OID4VCI
164+
* specification version is {@code "1.0-ID1"} (i.e., when the Service's
165+
* {@code oid4vciVersion} is unset or set to {@code "1.0-ID1"}) and the
166+
* credential request contains the {@code format} parameter. Note that in
167+
* the final version of the specification, the {@code format} parameter is
168+
* deprecated.
169+
* </p>
170+
*
134171
* @param format
135172
* The value of the {@code format} parameter in the credential request.
136-
* Such as {@code "jwt_vc_json"} and {@code "vc+sd-jwt"}.
173+
* Such as {@code "jwt_vc_json"} and {@code "dc+sd-jwt"}.
137174
*
138175
* @return
139176
* {@code this} object.
@@ -299,4 +336,114 @@ public CredentialRequestInfo setDetails(String details)
299336

300337
return this;
301338
}
339+
340+
341+
/**
342+
* Get the value of the {@code credential_configuration_id} parameter in
343+
* the credential request.
344+
*
345+
* <p>
346+
* This property is not available when the supported OID4VCI specification
347+
* version is {@code "1.0-ID1"} (i.e., when the Service's
348+
* {@code oid4vciVersion} is unset or set to {@code "1.0-ID1"}), because
349+
* the {@code credential_configuration_id} parameter does not exist in
350+
* OID4VCI 1.0 ID1.
351+
* </p>
352+
*
353+
* @return
354+
* The value of the {@code credential_configuration_id} parameter
355+
* in the credential request.
356+
*
357+
* @since 4.34
358+
* @since Authlete 3.0.25
359+
*/
360+
public String getCredentialConfigurationId()
361+
{
362+
return credentialConfigurationId;
363+
}
364+
365+
366+
/**
367+
* Set the value of the {@code credential_configuration_id} parameter in
368+
* the credential request.
369+
*
370+
* <p>
371+
* This property is not available when the supported OID4VCI specification
372+
* version is {@code "1.0-ID1"} (i.e., when the Service's
373+
* {@code oid4vciVersion} is unset or set to {@code "1.0-ID1"}), because
374+
* the {@code credential_configuration_id} parameter does not exist in
375+
* OID4VCI 1.0 ID1.
376+
* </p>
377+
*
378+
* @param id
379+
* The value of the {@code credential_configuration_id} parameter
380+
* in the credential request.
381+
*
382+
* @return
383+
* {@code this} object.
384+
*
385+
* @since 4.34
386+
* @since Authlete 3.0.25
387+
*/
388+
public CredentialRequestInfo setCredentialConfigurationId(String id)
389+
{
390+
this.credentialConfigurationId = id;
391+
392+
return this;
393+
}
394+
395+
396+
/**
397+
* Get the value of the {@code credential_identifier} parameter in the
398+
* credential request.
399+
*
400+
* <p>
401+
* This property is not available when the supported OID4VCI specification
402+
* version is {@code "1.0-ID1"} (i.e., when the Service's
403+
* {@code oid4vciVersion} is unset or set to {@code "1.0-ID1"}), because
404+
* Authlete does not support the {@code credential_identifier} parameter
405+
* for OID4VCI 1.0 ID1.
406+
* </p>
407+
*
408+
* @return
409+
* The value of the {@code credential_identifier} parameter in the
410+
* credential request.
411+
*
412+
* @since 4.34
413+
* @since Authlete 3.0.25
414+
*/
415+
public String getCredentialIdentifier()
416+
{
417+
return credentialIdentifier;
418+
}
419+
420+
421+
/**
422+
* Set the value of the {@code credential_identifier} parameter in the
423+
* credential request.
424+
*
425+
* <p>
426+
* This property is not available when the supported OID4VCI specification
427+
* version is {@code "1.0-ID1"} (i.e., when the Service's
428+
* {@code oid4vciVersion} is unset or set to {@code "1.0-ID1"}), because
429+
* Authlete does not support the {@code credential_identifier} parameter
430+
* for OID4VCI 1.0 ID1.
431+
* </p>
432+
*
433+
* @param identifier
434+
* The value of the {@code credential_identifier} parameter in the
435+
* credential request.
436+
*
437+
* @return
438+
* {@code this} object.
439+
*
440+
* @since 4.34
441+
* @since Authlete 3.0.25
442+
*/
443+
public CredentialRequestInfo setCredentialIdentifier(String identifier)
444+
{
445+
this.credentialIdentifier = identifier;
446+
447+
return this;
448+
}
302449
}

0 commit comments

Comments
 (0)