Skip to content

Commit

Permalink
[INJICERT-657] Added a fix to keep issuer metedata value fixed (#156)
Browse files Browse the repository at this point in the history
Signed-off-by: Piyush7034 <[email protected]>
Signed-off-by: Vishwa <[email protected]>
Piyush7034 authored Dec 18, 2024
1 parent 8ec7405 commit 0e1e9ac
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -142,10 +142,14 @@ public Map<String, Object> getCredentialIssuerMetadata(String version) {
if(issuerMetadata.containsKey(version)) {
return issuerMetadata.get(version);
} else if(version != null && version.equals("vd12")) {
Map<String, Object> vd12IssuerMetadata = convertLatestToVd12(issuerMetadata.get("latest"));
LinkedHashMap<String, Object> originalIssuerMetadata = new LinkedHashMap<>(issuerMetadata.get("latest"));
Map<String, Object> vd12IssuerMetadata = convertLatestToVd12(originalIssuerMetadata);
issuerMetadata.put("vd12", (LinkedHashMap<String, Object>) vd12IssuerMetadata);
return vd12IssuerMetadata;
} else if(version != null && version.equals("vd11")) {
Map<String, Object> vd11IssuerMetadata = convertLatestToVd11(issuerMetadata.get("latest"));
LinkedHashMap<String, Object> originalIssuerMetadata = new LinkedHashMap<>(issuerMetadata.get("latest"));
Map<String, Object> vd11IssuerMetadata = convertLatestToVd11(originalIssuerMetadata);
issuerMetadata.put("vd11", (LinkedHashMap<String, Object>) vd11IssuerMetadata);
return vd11IssuerMetadata;
}
throw new InvalidRequestException(ErrorConstants.UNSUPPORTED_OPENID_VERSION);
Original file line number Diff line number Diff line change
@@ -117,10 +117,14 @@ public Map<String, Object> getCredentialIssuerMetadata(String version) {
if(issuerMetadata.containsKey(version)) {
return issuerMetadata.get(version);
} else if(version != null && version.equals("vd12")) {
Map<String, Object> vd12IssuerMetadata = convertLatestToVd12(issuerMetadata.get(version));
LinkedHashMap<String, Object> originalIssuerMetadata = new LinkedHashMap<>(issuerMetadata.get("latest"));
Map<String, Object> vd12IssuerMetadata = convertLatestToVd12(originalIssuerMetadata);
issuerMetadata.put("vd12", (LinkedHashMap<String, Object>) vd12IssuerMetadata);
return vd12IssuerMetadata;
} else if(version != null && version.equals("vd11")) {
Map<String, Object> vd11IssuerMetadata = convertLatestToVd11(issuerMetadata.get(version));
LinkedHashMap<String, Object> originalIssuerMetadata = new LinkedHashMap<>(issuerMetadata.get("latest"));
Map<String, Object> vd11IssuerMetadata = convertLatestToVd11(originalIssuerMetadata);
issuerMetadata.put("vd11", (LinkedHashMap<String, Object>) vd11IssuerMetadata);
return vd11IssuerMetadata;
}
throw new InvalidRequestException(ErrorConstants.UNSUPPORTED_OPENID_VERSION);

0 comments on commit 0e1e9ac

Please sign in to comment.