// oauth config
availableServices = new Services(http, Configuration.getInstance().getBaseUrl());
availableServices.discover();
ServiceItem request = availableServices.getItem("http://oauth.net/core/1.0/endpoint/request");
ServiceItem authorization = availableServices.getItem("http://oauth.net/core/1.0/endpoint/authorize");
ServiceItem access = availableServices.getItem("http://oauth.net/core/1.0/endpoint/access");
if(request == null)
{
throw new Exception("Could not find request service");
}
if(authorization == null)
{
throw new Exception("Could not find authorization service");
}
if(access == null)
{
throw new Exception("Could not find access service");
}
OauthProvider provider = new OauthProvider(request.getUri(), authorization.getUri(), access.getUri(), Configuration.getInstance().getConsumerKey(), Configuration.getInstance().getConsumerSecret());
oauth = new Oauth(http, provider);
}
catch(Exception e)
{
Zubat.handleException(e);