@Test public void findAccessTokenByRefreshToken() throws Exception { String clientId = "oaoedd"; String refreshToken = GuidGenerator.generate(); final AccessToken accessToken = oauthJdbcRepository.findAccessTokenByRefreshToken(refreshToken, clientId); assertNull(accessToken); }
@Override public AccessToken findAccessTokenByRefreshToken(String refreshToken, String clientId) { final String sql = " select * from oauth_access_token where refresh_token = ? and client_id = ? "; final List<AccessToken> list = jdbcTemplate.query(sql, accessTokenRowMapper, refreshToken, clientId); return list.isEmpty() ? null : list.get(0); }
OauthJdbcRepository extends AbstractJdbcRepository implements OauthRepository { @Override public AccessToken findAccessTokenByRefreshToken(String refreshToken, String clientId) { final String sql = " select * from oauth_access_token where refresh_token = ? and client_id = ? "; final List<AccessToken> list = jdbcTemplate.query(sql, accessTokenRowMapper, refreshToken, clientId); return list.isEmpty() ? null : list.get(0); } }
OauthJdbcRepository extends AbstractJdbcRepository implements OauthRepository { @Override public AccessToken findAccessTokenByRefreshToken(String refreshToken, String clientId) { final String sql = " select * from oauth_access_token where refresh_token = ? and client_id = ? "; final List<AccessToken> list = jdbcTemplate.query(sql, accessTokenRowMapper, refreshToken, clientId); return list.isEmpty() ? null : list.get(0); }  }
OauthJdbcRepository extends AbstractJdbcRepository implements OauthRepository { @Override public AccessToken findAccessTokenByRefreshToken(String refreshToken, String clientId) { final String sql = " select * from oauth_access_token where refresh_token = ? and client_id = ? "; final List<AccessToken> list = jdbcTemplate.query(sql, accessTokenRowMapper, refreshToken, 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 AccessToken findAccessTokenByRefreshToken(String refreshToken, String clientId) { final String sql = " select * from oauth_access_token where refresh_token = ? and client_id = ? "; final List<AccessToken> list = jdbcTemplate.query(sql, accessTokenRowMapper, refreshToken, 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);  }