public boolean unregisterClient(UnregisterProfile profile,ServerConfig utils,Context context) throws AppCatalogException {
  StringBuilder endPoint=new StringBuilder();
  endPoint.append(utils.getAPIServerURL(context));
  endPoint.append(Constants.DYNAMIC_CLIENT_REGISTER_ENDPOINT);
  endPoint.append("?" + USER_ID + "="+ profile.getUserId());
  endPoint.append("&" + CONSUMER_KEY + "="+ profile.getConsumerKey());
  endPoint.append("&" + APPLICATION_NAME + "="+ profile.getApplicationName());
  EndPointInfo endPointInfo=new EndPointInfo();
  endPointInfo.setHttpMethod(org.wso2.emm.agent.proxy.utils.Constants.HTTP_METHODS.DELETE);
  endPointInfo.setEndPoint(endPoint.toString());
  sendRequest(endPointInfo,null,Constants.DYNAMIC_CLIENT_UNREGISTER_REQUEST_CODE);
  return true;
}

public boolean unregisterClient ( UnregisterProfile profile , ServerConfig utils , Context context ) throws AppCatalogException { StringBuilder endPoint = new StringBuilder ( ) ; endPoint . append ( utils . getAPIServerURL ( context ) ) ; endPoint . append ( Constants . DYNAMIC_CLIENT_REGISTER_ENDPOINT ) ; endPoint . append ( "?" + USER_ID + "=" + profile . getUserId ( ) ) ; endPoint . append ( "&" + CONSUMER_KEY + "=" + profile . getConsumerKey ( ) ) ; endPoint . append ( "&" + APPLICATION_NAME + "=" + profile . getApplicationName ( ) ) ; EndPointInfo endPointInfo = new EndPointInfo ( ) ; endPointInfo . setHttpMethod ( org . wso2 . emm . agent . proxy . utils . Constants . HTTP_METHODS . DELETE ) ; endPointInfo . setEndPoint ( endPoint . toString ( ) ) ; sendRequest ( endPointInfo , null , Constants . DYNAMIC_CLIENT_UNREGISTER_REQUEST_CODE ) ; return true ; }
this method is used to unregister the oauth application that has been registered at the device authentication .
