Skip to content

Commit

Permalink
Merge pull request #1078 from ase-101/binding
Browse files Browse the repository at this point in the history
ES-107
  • Loading branch information
mahammedtaheer authored Sep 5, 2023
2 parents fd5f3be + d23f4a4 commit 4ce7470
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions authentication/esignet-integration-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
<dependency>
<groupId>io.mosip.esignet</groupId>
<artifactId>esignet-integration-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.2.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.mosip.kernel</groupId>
<artifactId>kernel-keymanager-service</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.0.1-B2</version>
<scope>provided</scope>
<classifier>lib</classifier>
<exclusions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public class IdaVCIssuancePluginImpl implements VCIssuancePlugin {
public static final String SIGNATURE_HEADER_NAME = "signature";
public static final String AUTHORIZATION_HEADER_NAME = "Authorization";
public static final String OIDC_SERVICE_APP_ID = "OIDC_SERVICE";
private static Base64.Decoder urlSafeDecoder;
public static final String AES_CIPHER_FAILED = "aes_cipher_failed";
public static final String NO_UNIQUE_ALIAS = "no_unique_alias";

Expand Down Expand Up @@ -95,13 +94,14 @@ public class IdaVCIssuancePluginImpl implements VCIssuancePlugin {
@Value("${mosip.esignet.cache.security.secretkey.reference-id}")
private String cacheSecretKeyRefId;

private Base64.Decoder urlSafeDecoder = Base64.getUrlDecoder();


@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public VCResult getVerifiableCredentialWithLinkedDataProof(VCRequestDto vcRequestDto, String holderId,
Map<String, Object> identityDetails) {
log.info("Started to created the VCIssuance");
log.info("Started to build vci-exchange request : {} && clientId : {}",
identityDetails.get(CLIENT_ID).toString());
try {

Map<String, Object> vciTransaction = vciTransactionHelper
Expand All @@ -118,8 +118,8 @@ public VCResult getVerifiableCredentialWithLinkedDataProof(VCRequestDto vcReques
idaVciExchangeRequest.setCredSubjectId(holderId);
idaVciExchangeRequest.setVcFormat(vcRequestDto.getFormat());
vciCred.setCredentialSubject(vcRequestDto.getCredentialSubject());
vciCred.setType(List.of(
(vcRequestDto.getTypes().length > 1 ? vcRequestDto.getTypes()[1] : vcRequestDto.getTypes()[0])));
vciCred.setType(vcRequestDto.getType());
vciCred.setContext(vcRequestDto.getContext());
idaVciExchangeRequest.setCredentialsDefinition(vciCred);

String requestBody = objectMapper.writeValueAsString(idaVciExchangeRequest);
Expand Down Expand Up @@ -206,7 +206,7 @@ private String getKeyAlias(String keyAppId, String keyRefId) throws Exception {
throw new Exception(NO_UNIQUE_ALIAS);
}

public static byte[] b64Decode(String value) {
private byte[] b64Decode(String value) {
return urlSafeDecoder.decode(value);
}
}

0 comments on commit 4ce7470

Please sign in to comment.