use of com.zimbra.soap.account.message.RevokeOAuthConsumerResponse in project zm-mailbox by Zimbra.
the class RevokeOAuthConsumer method handle.
@Override
public Element handle(Element request, Map<String, Object> context) throws ServiceException {
ZimbraSoapContext zsc = getZimbraSoapContext(context);
account = getRequestedAccount(zsc);
RevokeOAuthConsumerRequest revokeRequest = JaxbUtil.elementToJaxb(request);
accessTokenToBeRemoved = revokeRequest.getAccessToken();
removeOAuthAccessor();
removeAccessTokenFromForeignPrincipal();
//Remove from cache
OAuthTokenCache.remove(accessTokenToBeRemoved, OAuthTokenCache.ACCESS_TOKEN_TYPE);
RevokeOAuthConsumerResponse response = new RevokeOAuthConsumerResponse();
return zsc.jaxbToElement(response);
}
Aggregations