8000 [OID4VCI] : Update Credential Issuer Metadata Model for OID4VCI Draft-15 by forkimenjeckayang · Pull Request #40749 · keycloak/keycloak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[OID4VCI] : Update Credential Issuer Metadata Model for OID4VCI Draft-15 #40749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* Represents a credentials issuer according to the OID4VCI Credentials Issuer Metadata
* {@see https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#name-credential-issuer-metadata}
* {@see https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0-15.html#name-credential-issuer-metadata}
*
* @author <a href="https://github.com/wistefan">Stefan Wiedemann</a>
*/
Expand All @@ -42,16 +43,29 @@ public class CredentialIssuer {
@JsonProperty("nonce_endpoint")
private String nonceEndpoint;

@JsonProperty("deferred_credential_endpoint")
private String deferredCredentialEndpoint;

@JsonProperty("authorization_servers")
private List<String> authorizationServers;

@JsonProperty("notification_endpoint")
private String notificationEndpoint;

@JsonProperty("credential_response_encryption")
private CredentialResponseEncryption credentialResponseEncryption;

@JsonProperty("batch_credential_issuance")
private BatchCredentialIssuance batchCredentialIssuance;

@JsonProperty("signed_metadata")
private String signedMetadata;

@JsonProperty("credential_configurations_supported")
private Map<String, SupportedCredentialConfiguration> credentialsSupported;

private DisplayObject display;
@JsonProperty("display")
private List<DisplayObject> display;

public String getCredentialIssuer() {
return credentialIssuer;
Expand Down Expand Up @@ -80,21 +94,12 @@ public CredentialIssuer setNonceEndpoint(String nonceEndpoint) {
return this;
}

public Map<String, SupportedCredentialConfiguration> getCredentialsSupported() {
return credentialsSupported;
public String getDeferredCredentialEndpoint() {
return deferredCredentialEndpoint;
}

public CredentialIssuer setCredentialsSupported(Map<String, SupportedCredentialConfiguration> credentialsSupported) {
this.credentialsSupported = Collections.unmodifiableMap(credentialsSupported);
return this;
}

public DisplayObject getDisplay() {
return display;
}

public CredentialIssuer setDisplay(DisplayObject display) {
this.display = display;
public CredentialIssuer setDeferredCredentialEndpoint(String deferredCredentialEndpoint) {
this.deferredCredentialEndpoint = deferredCredentialEndpoint;
return this;
}

Expand All @@ -115,5 +120,112 @@ public CredentialIssuer setNotificationEndpoint(String notificationEndpoint) {
this.notificationEndpoint = notificationEndpoint;
return this;
}
}

public CredentialResponseEncryption getCredentialResponseEncryption() {
return credentialResponseEncryption;
}

public CredentialIssuer setCredentialResponseEncryption(CredentialResponseEncryption credentialResponseEncryption) {
this.credentialResponseEncryption = credentialResponseEncryption;
return this;
}

public BatchCredentialIssuance getBatchCredentialIssuance() {
return batchCredentialIssuance;
}

public CredentialIssuer setBatchCredentialIssuance(BatchCredentialIssuance batchCredentialIssuance) {
this.batchCredentialIssuance = batchCredentialIssuance;
return this;
}

public String getSignedMetadata() {
return signedMetadata;
}

public CredentialIssuer setSignedMetadata(String signedMetadata) {
this.signedMetadata = signedMetadata;
return this;
}

public Map<String, SupportedCredentialConfiguration> getCredentialsSupported() {
return credentialsSupported;
}

public CredentialIssuer setCredentialsSupported(Map<String, SupportedCredentialConfiguration> credentialsSupported) {
if (credentialsSupported == null) {
throw new IllegalArgumentException("credentialsSupported cannot be null");
}
this.credentialsSupported = Collections.unmodifiableMap(new HashMap<>(credentialsSupported));
return this;
}

public List<DisplayObject> getDisplay() {
return display;
}

public CredentialIssuer setDisplay(List<DisplayObject> display) {
this.display = display;
return this;
}

/**
* Represents the credential_response_encryption metadata parameter.
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class CredentialResponseEncryption {
@JsonProperty("alg_values_supported")
private List<String> algValuesSupported;

@JsonProperty("enc_values_supported")
private List<String> encValuesSupported;

@JsonProperty("encryption_required")
private Boolean encryptionRequired;

public List<String> getAlgValuesSupported() {
return algValuesSupported;
}

public CredentialResponseEncryption setAlgValuesSupported(List<String> algValuesSupported) {
this.algValuesSupported = algValuesSupported;
return this;
}

public List<String> getEncValuesSupported() {
return encValuesSupported;
}

public CredentialResponseEncryption setEncValuesSupported(List<String> encValuesSupported) {
this.encValuesSupported = encValuesSupported;
return this;
}

public Boolean getEncryptionRequired() {
return encryptionRequired;
}

public CredentialResponseEncryption setEncryptionRequired(Boolean encryptionRequired) {
this.encryptionRequired = encryptionRequired;
return this;
}
}

/**
* Represents the batch_credential_issuance metadata parameter.
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class BatchCredentialIssuance {
@JsonProperty("batch_size")
private Integer batchSize;

public Integer getBatchSize() {
return batchSize;
}

public BatchCredentialIssuance setBatchSize(Integer batchSize) {
this.batchSize = batchSize;
return this;
}
}
}
Loading
0