@Test public void testFindClientDetails() throws Exception { String clientId = "oaoedd"; final ClientDetails clientDetails = oauthJdbcRepository.findClientDetails(clientId); assertNull(clientDetails); ClientDetails clientDetails1 = new ClientDetails(); clientDetails1.clientId(clientId); clientDetails1.clientSecret("Ole397dde2"); final int i = oauthJdbcRepository.saveClientDetails(clientDetails1); assertEquals(i, 1); final ClientDetails clientDetails2 = oauthJdbcRepository.findClientDetails(clientId); assertNotNull(clientDetails2); assertNotNull(clientDetails2.clientId()); }
@Override public ClientDetails findClientDetails(String clientId) { final String sql = " select * from oauth_client_details where archived = 0 and client_id = ? "; final List<ClientDetails> list = jdbcTemplate.query(sql, clientDetailsRowMapper, clientId); return list.isEmpty() ? null : list.get(0); }
OauthJdbcRepository extends AbstractJdbcRepository implements OauthRepository { @Override public ClientDetails findClientDetails(String clientId) { final String sql = " select * from oauth_client_details where archived = 0 and client_id = ? "; final List<ClientDetails> list = jdbcTemplate.query(sql, clientDetailsRowMapper, clientId); return list.isEmpty() ? null : list.get(0); } }
OauthJdbcRepository extends AbstractJdbcRepository implements OauthRepository { @Override public ClientDetails findClientDetails(String clientId) { final String sql = " select * from oauth_client_details where archived = 0 and client_id = ? "; final List<ClientDetails> list = jdbcTemplate.query(sql, clientDetailsRowMapper, clientId); return list.isEmpty() ? null : list.get(0); }  }
OauthJdbcRepository extends AbstractJdbcRepository implements OauthRepository { @Override public ClientDetails findClientDetails(String clientId) { final String sql = " select * from oauth_client_details where archived = 0 and client_id = ? "; final List<ClientDetails> list = jdbcTemplate.query(sql, clientDetailsRowMapper, clientId); return list.isEmpty() ? null : list.get(0); }  @Override ClientDetails findClientDetails(String clientId); @Override int saveClientDetails(final ClientDetails clientDetails); @Override int saveOauthCode(final OauthCode oauthCode); @Override OauthCode findOauthCode(String code, String clientId); @Override OauthCode findOauthCodeByUsernameClientId(String username, String clientId); @Override int deleteOauthCode(final OauthCode oauthCode); @Override AccessToken findAccessToken(String clientId, String username, String authenticationId); @Override int deleteAccessToken(final AccessToken accessToken); @Override int saveAccessToken(final AccessToken accessToken); @Override AccessToken findAccessTokenByRefreshToken(String refreshToken, String clientId); }
OauthJdbcRepository extends AbstractJdbcRepository implements OauthRepository { @Override public ClientDetails findClientDetails(String clientId) { final String sql = " select * from oauth_client_details where archived = 0 and client_id = ? "; final List<ClientDetails> list = jdbcTemplate.query(sql, clientDetailsRowMapper, clientId); return list.isEmpty() ? null : list.get(0); }  @Override ClientDetails findClientDetails(String clientId); @Override int saveClientDetails(final ClientDetails clientDetails); @Override int saveOauthCode(final OauthCode oauthCode); @Override OauthCode findOauthCode(String code, String clientId); @Override OauthCode findOauthCodeByUsernameClientId(String username, String clientId); @Override int deleteOauthCode(final OauthCode oauthCode); @Override AccessToken findAccessToken(String clientId, String username, String authenticationId); @Override int deleteAccessToken(final AccessToken accessToken); @Override int saveAccessToken(final AccessToken accessToken); @Override AccessToken findAccessTokenByRefreshToken(String refreshToken, String clientId);  }