@Test public void deleteAccessToken() { AccessToken accessToken = new AccessToken() .username("user") .authenticationId("auted") .clientId("client"); oauthJdbcRepository.deleteAccessToken(accessToken); }
@Override public int deleteAccessToken(final AccessToken accessToken) { final String sql = " delete from oauth_access_token where client_id = ? and username = ? and authentication_id = ?"; return jdbcTemplate.update(sql, new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setString(1, accessToken.clientId()); ps.setString(2, accessToken.username()); ps.setString(3, accessToken.authenticationId()); } }); }
OauthJdbcRepository extends AbstractJdbcRepository implements OauthRepository { @Override public int deleteAccessToken(final AccessToken accessToken) { final String sql = " delete from oauth_access_token where client_id = ? and username = ? and authentication_id = ?"; return jdbcTemplate.update(sql, new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setString(1, accessToken.clientId()); ps.setString(2, accessToken.username()); ps.setString(3, accessToken.authenticationId()); } }); } }
OauthJdbcRepository extends AbstractJdbcRepository implements OauthRepository { @Override public int deleteAccessToken(final AccessToken accessToken) { final String sql = " delete from oauth_access_token where client_id = ? and username = ? and authentication_id = ?"; return jdbcTemplate.update(sql, new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setString(1, accessToken.clientId()); ps.setString(2, accessToken.username()); ps.setString(3, accessToken.authenticationId()); } }); }  }
OauthJdbcRepository extends AbstractJdbcRepository implements OauthRepository { @Override public int deleteAccessToken(final AccessToken accessToken) { final String sql = " delete from oauth_access_token where client_id = ? and username = ? and authentication_id = ?"; return jdbcTemplate.update(sql, new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setString(1, accessToken.clientId()); ps.setString(2, accessToken.username()); ps.setString(3, accessToken.authenticationId()); } }); }  @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 int deleteAccessToken(final AccessToken accessToken) { final String sql = " delete from oauth_access_token where client_id = ? and username = ? and authentication_id = ?"; return jdbcTemplate.update(sql, new PreparedStatementSetter() { @Override public void setValues(PreparedStatement ps) throws SQLException { ps.setString(1, accessToken.clientId()); ps.setString(2, accessToken.username()); ps.setString(3, accessToken.authenticationId()); } }); }  @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);  }