@Test void checkIfUserInitiatedOperation_fail() { assertThrows(AuthorizationException.class, () -> AuthUtils.checkIfUserInitiatedOperation(getLoginResult(), Collections.singletonList(getPsuIdData("some wrong login")))); }
public static void checkIfUserInitiatedOperation(ResponseEntity<SCALoginResponseTO> loginResult, List<PsuIdData> psuIdData) { if (CollectionUtils.isNotEmpty(psuIdData)) { SCALoginResponseTO body = Objects.requireNonNull(loginResult.getBody()); AuthUtils.checkUserInitiatedProcedure(psuIdData.get(0).getPsuId(), body.getBearerToken()); } }
AuthUtils { public static void checkIfUserInitiatedOperation(ResponseEntity<SCALoginResponseTO> loginResult, List<PsuIdData> psuIdData) { if (CollectionUtils.isNotEmpty(psuIdData)) { SCALoginResponseTO body = Objects.requireNonNull(loginResult.getBody()); AuthUtils.checkUserInitiatedProcedure(psuIdData.get(0).getPsuId(), body.getBearerToken()); } } }
AuthUtils { public static void checkIfUserInitiatedOperation(ResponseEntity<SCALoginResponseTO> loginResult, List<PsuIdData> psuIdData) { if (CollectionUtils.isNotEmpty(psuIdData)) { SCALoginResponseTO body = Objects.requireNonNull(loginResult.getBody()); AuthUtils.checkUserInitiatedProcedure(psuIdData.get(0).getPsuId(), body.getBearerToken()); } } private  AuthUtils(); }
AuthUtils { public static void checkIfUserInitiatedOperation(ResponseEntity<SCALoginResponseTO> loginResult, List<PsuIdData> psuIdData) { if (CollectionUtils.isNotEmpty(psuIdData)) { SCALoginResponseTO body = Objects.requireNonNull(loginResult.getBody()); AuthUtils.checkUserInitiatedProcedure(psuIdData.get(0).getPsuId(), body.getBearerToken()); } } private  AuthUtils(); static boolean success(ResponseEntity<SCALoginResponseTO> authoriseForConsent); static String psuId(ObaMiddlewareAuthentication auth); static String psuId(BearerTokenTO bearerToken); static void checkIfUserInitiatedOperation(ResponseEntity<SCALoginResponseTO> loginResult, List<PsuIdData> psuIdData); }
AuthUtils { public static void checkIfUserInitiatedOperation(ResponseEntity<SCALoginResponseTO> loginResult, List<PsuIdData> psuIdData) { if (CollectionUtils.isNotEmpty(psuIdData)) { SCALoginResponseTO body = Objects.requireNonNull(loginResult.getBody()); AuthUtils.checkUserInitiatedProcedure(psuIdData.get(0).getPsuId(), body.getBearerToken()); } } private  AuthUtils(); static boolean success(ResponseEntity<SCALoginResponseTO> authoriseForConsent); static String psuId(ObaMiddlewareAuthentication auth); static String psuId(BearerTokenTO bearerToken); static void checkIfUserInitiatedOperation(ResponseEntity<SCALoginResponseTO> loginResult, List<PsuIdData> psuIdData);  }