Building the OAuth 1.0 client using Jersey APIs

Let's build a simple client to understand the API usage for accessing the OAuth 1.0 protected resource. Note that the JAX-RS specification does not have standardized APIs for the OAuth client yet. This example uses the Jersey API to build the OAuth 1.0 client.

The complete source code for this example is available on the Packt website. You can download the example from the Packt website link that is mentioned at the beginning of this book, in the Preface section. In the downloaded source code, see the rest-chapter6-oauth1-client project.

You should start by specifying the dependency to the oauth1-client JAR file in the client application. If you use Maven to build the client, the dependency ...

Get RESTful Java Web Services - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.