Class Proofs

java.lang.Object
org.keycloak.protocol.oid4vc.model.Proofs

public class Proofs extends Object
Proofs object for Credential Request in OID4VCI (Section 8.2). Contains arrays of different proof types (jwt, di_vp, attestation).
See Also:
  • Constructor Details

  • Method Details

    • getJwt

      public List<String> getJwt()
    • setJwt

      public Proofs setJwt(List<String> jwt)
    • getDiVp

      public List<DiVpProof> getDiVp()
    • setDiVp

      public Proofs setDiVp(List<DiVpProof> diVp)
    • getAttestation

      public List<String> getAttestation()
    • setAttestation

      public Proofs setAttestation(List<String> attestation)
    • getProofType

      public String getProofType()
      Determines the proof type based on which field is populated. Checks JWT first, then Attestation.
      Returns:
      the proof type string (ProofType.JWT or ProofType.ATTESTATION), or null if no proof type is found
    • setProofByType

      public Proofs setProofByType(String proofType, String proof)
      Sets the proof value based on the proof type. Sets the appropriate field (JWT or Attestation) depending on the proof type.
      Parameters:
      proofType - the proof type (ProofType.JWT or ProofType.ATTESTATION)
      proof - the proof value to set
      Returns:
      this instance for method chaining
    • getAllProofs

      public List<String> getAllProofs()
      Returns all proof values as a list. Checks JWT proofs first, then Attestation proofs. Returns an empty list if no proofs are present.
      Returns:
      a list containing all proof values, or an empty list if no proofs are present
    • getPresentProofTypes

      public List<String> getPresentProofTypes()
      Returns a list of proof types that are present (non-null and non-empty). This can be used to iterate over proof types that need validation.
      Returns:
      a list of proof type strings (ProofType.JWT, ProofType.ATTESTATION, etc.) that are present