'Revoke an OAuth2 access or refresh token.
token_type_hint is optional, and hints to the server
whether the passed token is a refresh or access token.
A call to this endpoint is considered a success if
the passed `token_id` is no longer valid. Thus, if an invalid
`token_id` was passed in, a successful 204 response will be returned.
See [RFC7009](http://tools.ietf.org/html/rfc7009)'

@validate(VRatelimit(rate_user=False, rate_ip=True, prefix='rate_revoke_token_'), token_id=nop('token'), token_hint=VOneOf('token_type_hint', ('access_token', 'refresh_token')))
def POST_revoke_token(self, token_id, token_hint):

    self.OPTIONS_revoke_token()
    response.status = 204
    if (not token_id):
        return
    types = (OAuth2AccessToken, OAuth2RefreshToken)
    if (token_hint == 'refresh_token'):
        types = reversed(types)
    for token_type in types:
        try:
            token = token_type._byID(token_id)
        except tdb_cassandra.NotFound:
            g.stats.simple_event(('oauth2.POST_revoke_token.cass_not_found.%s' % token_type.__name__))
            continue
        else:
            break
    else:
        return
    if constant_time_compare(token.client_id, c.oauth2_client._id):
        token.revoke()
    else:
        response.status = 400
        g.stats.simple_event('oauth2.errors.REVOKE_TOKEN_UNAUTHORIZED_CLIENT')
        return self.api_wrapper({'error': 'unauthorized_client'})
