diff --git a/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationServiceTest.java b/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationServiceTest.java index b2d533b80..78aa286db 100644 --- a/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationServiceTest.java +++ b/oidc-service-impl/src/test/java/io/mosip/esignet/services/AuthorizationServiceTest.java @@ -907,40 +907,6 @@ public void getOauthDetailsV3_withValidIDTokenHint_thenPass() { Assert.assertNotNull(oauthDetailResponseV2); } - @Test - public void getOauthDetailsV3_withValidIDTokenHintClientIdAndAUDMismatch_thenFail() { - ClientDetail clientDetail = new ClientDetail(); - clientDetail.setName(new HashMap<>()); - clientDetail.getName().put(Constants.NONE_LANG_KEY, "clientName"); - clientDetail.setId("34567"); - clientDetail.setRedirectUris(Arrays.asList("https://localshot:3044/logo.png","http://localhost:8088/v1/idp","/v1/idp")); - clientDetail.setClaims(Arrays.asList("email","given_name")); - clientDetail.setAcrValues(Arrays.asList("mosip:idp:acr:generated-code", "mosip:idp:acr:wallet")); - - OAuthDetailRequestV3 oauthDetailRequest = new OAuthDetailRequestV3(); - oauthDetailRequest.setClientId("mosip-signup-oauth-client"); - oauthDetailRequest.setRedirectUri("http://localhost:8088/v1/idp"); - oauthDetailRequest.setNonce("test-nonce"); - ClaimsV2 claims = new ClaimsV2(); - claims.setId_token(new HashMap<>()); - ClaimDetail claimDetail = new ClaimDetail(); - claimDetail.setValues(new String[]{"mosip:idp:acr:wallet", "mosip:idp:acr:webauthn"}); - claims.getId_token().put("acr", claimDetail); - oauthDetailRequest.setClaims(claims); - oauthDetailRequest.setAcrValues("mosip:idp:acr:biometrics mosip:idp:acr:generated-code"); - oauthDetailRequest.setIdTokenHint("eyJraWQiOiJtbG02RVNRaFB5dVVsWmY0dnBZbGJTVWlSMXBXcG5jdW9kamtnRjNaNU5nIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJxWS0tNVk0VG9Ga1dUb1hKclJGbVBXUEhEWkxrY2lNTDQtX2cxTDJBNXhJIiwiYXVkIjoibW9zaXAtc2lnbnVwLW9hdXRoLWNsaWVudCIsImFjciI6Im1vc2lwOmlkcDphY3I6Z2VuZXJhdGVkLWNvZGUiLCJhdXRoX3RpbWUiOjE3MjUyNjk4ODUsImlzcyI6Imh0dHBzOlwvXC9lc2lnbmV0bDIuY2FtZGdjLXFhLm1vc2lwLm5ldFwvdjFcL2VzaWduZXQiLCJleHAiOjE3MjUyNzAwNzMsImlhdCI6MTcyNTI2OTg5Mywibm9uY2UiOiI5NzNlaWVsanpuZyJ9.VMMn92CFzGkVyx8Jwrq03KhuXOXj3wRlUoxZQQBN7MxlfIxGSX_yE7iw3JWxohzQuHticndtQX2LELcGTPhclzRop3skHCeo6ZPGJklCiRA3F5SyfCYLvDprgE_-pQhLWeECqRtW_8jFFgZSORMoxy8eBj5Vvc8q2zcoDjE-JiLZvqE9UWDRpAKzumJcD3iJvBwE-9jkzQtWZbp-tZrpPrm-KCZU6-Q3qhWU23E9DSMg_6byq4iH51TFwO0nHW1kaxhsqHvCsTX7YTvmfWXUwPVRLNZh5Uszt8EIsgpKIUDkRImqmCUbP1LwoFG55MsW67QzHNTFuR6H-4LidSKnnA"); - - MockHttpServletRequest request = new MockHttpServletRequest(); - request.setCookies(new Cookie("qY--5Y4ToFkWToXJrRFmPWPHDZLkciML4-_g1L2A5xI", "5Y4ToFkWToXJrRFmPWPHDZLkciML4"+SERVER_NONCE_SEPARATOR+"test-state")); - - try { - OAuthDetailResponseV2 oauthDetailResponseV2 = authorizationServiceImpl.getOauthDetailsV3(oauthDetailRequest, request); - Assert.assertNotNull(oauthDetailResponseV2); - } catch (EsignetException e) { - Assert.assertEquals(ErrorConstants.INVALID_ID_TOKEN_HINT, e.getErrorCode()); - } - } - @Test public void getOauthDetailsV3_withValidIDTokenHintClientIdAndAUDMismatch_thenFail() { ClientDetail clientDetail = new ClientDetail(); diff --git a/oidc-service-impl/src/test/java/io/mosip/esignet/services/ConsentHelperServiceTest.java b/oidc-service-impl/src/test/java/io/mosip/esignet/services/ConsentHelperServiceTest.java index f45d3f558..86734908a 100644 --- a/oidc-service-impl/src/test/java/io/mosip/esignet/services/ConsentHelperServiceTest.java +++ b/oidc-service-impl/src/test/java/io/mosip/esignet/services/ConsentHelperServiceTest.java @@ -549,7 +549,6 @@ private String generateSignature(Map payloadMap) throws Exception JWSObject jwsObject = new JWSObject(header,payload); jwsObject.sign(signer); String token = jwsObject.serialize(); - log.info("The token is {}",token); String parts[]=token.split("\\."); return parts[0]+"."+parts[2]; }