use of com.github.scribejava.core.model.OAuthConfig in project scribejava by scribejava.
the class ServiceBuilderTest method shouldAcceptASignatureType.
@Test
public void shouldAcceptASignatureType() {
builder.apiKey("key").apiSecret("secret").signatureType(SignatureType.QueryString).build(api);
final OAuthConfig config = api.getConfig();
assertEquals(config.getApiKey(), "key");
assertEquals(config.getApiSecret(), "secret");
assertEquals(config.getSignatureType(), SignatureType.QueryString);
}
use of com.github.scribejava.core.model.OAuthConfig in project scribejava by scribejava.
the class ServiceBuilderTest method shouldReturnConfigDefaultValues.
@Test
public void shouldReturnConfigDefaultValues() {
builder.apiKey("key").apiSecret("secret").build(api);
final OAuthConfig config = api.getConfig();
assertEquals(config.getApiKey(), "key");
assertEquals(config.getApiSecret(), "secret");
assertEquals(config.getCallback(), OAuthConstants.OUT_OF_BAND);
assertEquals(config.getSignatureType(), SignatureType.Header);
}
use of com.github.scribejava.core.model.OAuthConfig in project scribejava by scribejava.
the class ServiceBuilderTest method shouldAcceptAnScope.
@Test
public void shouldAcceptAnScope() {
builder.apiKey("key").apiSecret("secret").scope("rss-api").build(api);
final OAuthConfig config = api.getConfig();
assertEquals(config.getApiKey(), "key");
assertEquals(config.getApiSecret(), "secret");
assertEquals(config.getScope(), "rss-api");
}
Aggregations