class RevokeHandler extends HttpResource {

   protected FullHttpResponse doRevoke(String authHeader, String token) {
      if(StringUtils.isBlank(token)) {
         return OAuthUtil.badRequest("token is missing");
      }

      BasicAuthCredentials creds = BasicAuthCredentials.fromAuthHeaderString(authHeader);

      Pair<UUID, Integer> personWithTtl = oauthDao.getPersonWithRefresh(creds.getUsername(), token);
      if(personWithTtl == null) {
         personWithTtl = oauthDao.getPersonWithAccess(creds.getUsername(), token);
      }


      if(personWithTtl != null) {
         triggerPlaceDeauthorizedIfNecessary(creds.getUsername(), personWithTtl.getKey());
         oauthDao.removePersonAndTokens(creds.getUsername(), personWithTtl.getKey());
      }
      return OAuthUtil.ok();
   }

   @Inject public  RevokeHandler(
         ApplicationAuth authorizer,
         BridgeMetrics metrics,
         OAuthDAO oauthDao,
         PlaceSelectionHandler placeSelectionHandler
   );

}