com.belladati.sdk.impl.oauth.BellaDatiOAuthConsumer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-android Show documentation
Show all versions of sdk-android Show documentation
The BellaDati SDK allows accessing a BellaDati server from 3rd-party applications using Java. This project contains the implementation for Android.
package com.belladati.sdk.impl.oauth;
import oauth.signpost.AbstractOAuthConsumer;
import oauth.signpost.http.HttpRequest;
import com.belladati.httpclientandroidlib.client.methods.HttpUriRequest;
public class BellaDatiOAuthConsumer extends AbstractOAuthConsumer {
/** The serialVersionUID */
private static final long serialVersionUID = 7676787639728090446L;
public BellaDatiOAuthConsumer(String consumerKey, String consumerSecret) {
super(consumerKey, consumerSecret);
}
@Override
protected HttpRequest wrap(Object request) {
if (!(request instanceof com.belladati.httpclientandroidlib.HttpRequest)) {
throw new IllegalArgumentException("This consumer expects requests of type "
+ com.belladati.httpclientandroidlib.HttpRequest.class.getCanonicalName());
}
return new BellaDatiHttpRequestAdapter((HttpUriRequest) request);
}
}