Make ProofType a string instead of enum (#31000)

fixes #30999

Signed-off-by: Pascal Knüppel <pascal.knueppel@governikus.de>
This commit is contained in:
Pascal Knüppel 2024-07-16 11:30:38 +02:00 committed by GitHub
parent 479e2132fc
commit 8485bc38ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 18 deletions

View file

@ -30,15 +30,15 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public class Proof { public class Proof {
@JsonProperty("proof_type") @JsonProperty("proof_type")
private ProofType proofType; private String proofType;
private Object proofObject; private Object proofObject;
public ProofType getProofType() { public String getProofType() {
return proofType; return proofType;
} }
public Proof setProofType(ProofType proofType) { public Proof setProofType(String proofType) {
this.proofType = proofType; this.proofType = proofType;
return this; return this;
} }

View file

@ -23,19 +23,10 @@ package org.keycloak.protocol.oid4vc.model;
* *
* @author <a href="https://github.com/wistefan">Stefan Wiedemann</a> * @author <a href="https://github.com/wistefan">Stefan Wiedemann</a>
*/ */
public enum ProofType { public final class ProofType {
JWT("jwt"), public static final String JWT = "jwt";
LD_PROOF("ldp_vp"), public static final String LD_PROOF = "ldp_vp";
CWT("cwt"); public static final String CWT = "cwt";
private final String value;
ProofType(String value) {
this.value = value;
}
public String getValue() {
return value;
}
} }