From 8485bc38ef4af1f422f7e4bbb9c1a089cfaaf07c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Kn=C3=BCppel?= Date: Tue, 16 Jul 2024 11:30:38 +0200 Subject: [PATCH] Make ProofType a string instead of enum (#31000) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #30999 Signed-off-by: Pascal Knüppel --- .../keycloak/protocol/oid4vc/model/Proof.java | 8 ++++---- .../protocol/oid4vc/model/ProofType.java | 19 +++++-------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/services/src/main/java/org/keycloak/protocol/oid4vc/model/Proof.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/Proof.java index 984432e45c..7ec02e334f 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vc/model/Proof.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/Proof.java @@ -30,15 +30,15 @@ import com.fasterxml.jackson.annotation.JsonProperty; public class Proof { @JsonProperty("proof_type") - private ProofType proofType; + private String proofType; private Object proofObject; - public ProofType getProofType() { + public String getProofType() { return proofType; } - public Proof setProofType(ProofType proofType) { + public Proof setProofType(String proofType) { this.proofType = proofType; return this; } @@ -51,4 +51,4 @@ public class Proof { this.proofObject = proofObject; return this; } -} \ No newline at end of file +} diff --git a/services/src/main/java/org/keycloak/protocol/oid4vc/model/ProofType.java b/services/src/main/java/org/keycloak/protocol/oid4vc/model/ProofType.java index 5306744a15..792f20188d 100644 --- a/services/src/main/java/org/keycloak/protocol/oid4vc/model/ProofType.java +++ b/services/src/main/java/org/keycloak/protocol/oid4vc/model/ProofType.java @@ -23,19 +23,10 @@ package org.keycloak.protocol.oid4vc.model; * * @author Stefan Wiedemann */ -public enum ProofType { +public final class ProofType { - JWT("jwt"), - LD_PROOF("ldp_vp"), - CWT("cwt"); + public static final String JWT = "jwt"; + public static final String LD_PROOF = "ldp_vp"; + public static final String CWT = "cwt"; - private final String value; - - ProofType(String value) { - this.value = value; - } - - public String getValue() { - return value; - } -} \ No newline at end of file +}