Skip to content

Commit

Permalink
fix some attributes from LearCredentialEmployee
Browse files Browse the repository at this point in the history
  • Loading branch information
javieralvarezin2 committed Oct 2, 2024
1 parent f1fced4 commit f23c9c3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

@Builder
public record CredentialSubjectLCEmployee(
@JsonProperty("mandate") MandateLCEmployee mandateLCEmployee
@JsonProperty("mandate") MandateLCEmployee mandate
) {}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public record LEARCredentialEmployee(
@JsonProperty("@context") List<String> context,
@JsonProperty("id") String id,
@JsonProperty("type") List<String> type,
@JsonProperty("credentialSubject") CredentialSubjectLCEmployee credentialSubjectLCEmployee,
@JsonProperty("credentialSubject") CredentialSubjectLCEmployee credentialSubject,
@JsonProperty("expirationDate") String expirationDate,
@JsonProperty("issuanceDate") String issuanceDate,
@JsonProperty("issuer") String issuer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
public record MandateLCEmployee(
@JsonProperty("id") String id,
@JsonProperty("life_span") LifeSpan lifeSpan,
@JsonProperty("mandatee") MandateeLCEmployee mandateeLCEmployee,
@JsonProperty("mandatee") MandateeLCEmployee mandatee,
@JsonProperty("mandator") Mandator mandator,
@JsonProperty("power") List<PowerLCEmployee> powerLCEmployee,
@JsonProperty("power") List<PowerLCEmployee> power,
@JsonProperty("signer") Signer signer
) {}
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private Object getVerifiableCredential(OAuth2AuthorizationGrantAuthenticationTok
private String getCredentialSubjectFromVerifiableCredential(Object verifiableCredential) {
if (verifiableCredential instanceof LEARCredentialEmployee learCredentialEmployee) {
// Extrae y retorna el credentialSubject específico para `LEARCredentialEmployee`
return learCredentialEmployee.credentialSubjectLCEmployee().mandateLCEmployee().mandateeLCEmployee().id();
return learCredentialEmployee.credentialSubject().mandate().mandatee().id();
} else if (verifiableCredential instanceof LEARCredentialMachine learCredentialMachine) {
// Extrae y retorna el credentialSubject específico para `LEARCredentialMachine`
return learCredentialMachine.credentialSubject().mandate().mandatee().id();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private String extractMandateeId(List<String> credentialTypes, Payload payload)

if (credentialTypes.contains(LEARCredentialType.LEARCredentialEmployee.getValue())) {
LEARCredentialEmployee learCredentialEmployee = mapCredentialToLEARCredentialEmployee(vcObject);
return learCredentialEmployee.credentialSubjectLCEmployee().mandateLCEmployee().mandateeLCEmployee().id();
return learCredentialEmployee.credentialSubject().mandate().mandatee().id();
} else if (credentialTypes.contains(LEARCredentialType.LEARCredentialMachine.getValue())) {
LEARCredentialMachine learCredentialMachine = mapCredentialToLEARCredentialMachine(vcObject);
return learCredentialMachine.credentialSubject().mandate().mandatee().id();
Expand Down

0 comments on commit f23c9c3

Please sign in to comment.