Who said OAuth/OAuth2 was difficult? Configuring ScribeJava is so easy your grandma can do it! check it out:
OAuthService service = new ServiceBuilder() .apiKey(YOUR_API_KEY) .apiSecret(YOUR_API_SECRET) .build(LinkedInApi20.instance());
<dependency> <groupId>com.github.scribejava</groupId> <artifactId>scribejava-apis</artifactId> <version>2.5.3</version> </dependency>
And in case you need just core classes (that's it, without any external API (FB, VK, GitHub, Google etc) specific code), you could pull just 'core' artifact.
<dependency> <groupId>com.github.scribejava</groupId> <artifactId>scribejava-core</artifactId> <version>2.5.3</version> </dependency>
转载于:https://blog.51cto.com/langlichong/1772594