@Test public void validateApp() throws Exception { assertFalse(service.validateApp("foo", "bar")); ClientApp clientApp = service.create(dev, "myapp", "ya ~ good", "http: assertTrue(service.validateApp(clientApp.getClientId(), clientApp.getClientSecret())); service.resetClientAppSecret(dev, clientApp.getClientId()); assertFalse(service.validateApp(clientApp.getClientId(), clientApp.getClientSecret())); ClientApp reset = service.loadClientAppWithoutCache(clientApp.getClientId()); assertTrue(service.validateApp(reset.getClientId(), reset.getClientSecret())); }
@Override public boolean validateApp(String clientId, String clientSecret) { return clientAppDao.findApp(clientId) .filter(app -> app.getClientSecret().equals(clientSecret)) .isPresent(); }
ClientAppServiceImpl implements ClientAppService { @Override public boolean validateApp(String clientId, String clientSecret) { return clientAppDao.findApp(clientId) .filter(app -> app.getClientSecret().equals(clientSecret)) .isPresent(); } }
ClientAppServiceImpl implements ClientAppService { @Override public boolean validateApp(String clientId, String clientSecret) { return clientAppDao.findApp(clientId) .filter(app -> app.getClientSecret().equals(clientSecret)) .isPresent(); }  }
ClientAppServiceImpl implements ClientAppService { @Override public boolean validateApp(String clientId, String clientSecret) { return clientAppDao.findApp(clientId) .filter(app -> app.getClientSecret().equals(clientSecret)) .isPresent(); }  @Override ClientApp create(Authorization creator,
      String name,
      String description,
      String callbackUri); @Override ClientApp loadClientAppWithoutCache(String clientId); @Override List<ClientApp> listClientApps(Authorization creator); @Override void update(Authorization creator,
      String clientId,
      String name,
      String description,
      String callbackUri); @Override Optional<ClientApp> verifyRedirectUri(String clientId, String redirectUri); @Override String directGrantCode(String oauthDirectAuthorize,
      String clientId,
      String scope,
      String redirectUri); @Override OauthAccessTokenDto createOauthAccessTokenByGrantCode(String code,
      String clientId,
      String redirectUri); @Override Optional<ClientAppUserAccessToken> verifyAccessToken(@Nullable String rawAccessToken); @Override List<ClientAppUser> listGrantedAppUsers(Authorization authorization); @Override void resetClientAppSecret(Authorization creator, String clientId); @Override void revokeApp(Authorization user, String clientId); @Override boolean validateApp(String clientId, String clientSecret); @Override String generateDebugAccessToken(Authorization creator, String clientId); @Override List<ClientApp> listGrantedApps(Authorization user); }
ClientAppServiceImpl implements ClientAppService { @Override public boolean validateApp(String clientId, String clientSecret) { return clientAppDao.findApp(clientId) .filter(app -> app.getClientSecret().equals(clientSecret)) .isPresent(); }  @Override ClientApp create(Authorization creator,
      String name,
      String description,
      String callbackUri); @Override ClientApp loadClientAppWithoutCache(String clientId); @Override List<ClientApp> listClientApps(Authorization creator); @Override void update(Authorization creator,
      String clientId,
      String name,
      String description,
      String callbackUri); @Override Optional<ClientApp> verifyRedirectUri(String clientId, String redirectUri); @Override String directGrantCode(String oauthDirectAuthorize,
      String clientId,
      String scope,
      String redirectUri); @Override OauthAccessTokenDto createOauthAccessTokenByGrantCode(String code,
      String clientId,
      String redirectUri); @Override Optional<ClientAppUserAccessToken> verifyAccessToken(@Nullable String rawAccessToken); @Override List<ClientAppUser> listGrantedAppUsers(Authorization authorization); @Override void resetClientAppSecret(Authorization creator, String clientId); @Override void revokeApp(Authorization user, String clientId); @Override boolean validateApp(String clientId, String clientSecret); @Override String generateDebugAccessToken(Authorization creator, String clientId); @Override List<ClientApp> listGrantedApps(Authorization user);  }