Hey so you want to integrate with or provide OAuth services?

This project can help you do that. It is a utility rather than a client. What does that mean? Well we didn't want to put any restrictions on the HTTP library you are using (maybe java.net.URL, or Http commons). Hence this utility doesn't actually make HTTP requests or process them; most OAuth projects do. What this utility will do is help you to generate the needed info to generate (client side), or to verify (server side) an OAuth request.

The client leaves the possibilities open for how you want to form your OAuth request. Some may use POST headers to send parameters, others use query params in the request URL, and some the Authorization header. We allow for all forms with no overhead. This gives more flexibility when generating parts needed to instruct any HTTP client to make a proper request.

So what would this all look like?

def curl = RequestUtils.toURLString(oauth.createOAuthRequest("get", url, params))

This is vague on purpose. url is the service's URL, params is a dictionary/map of params expected by the service, and the "get" is specifying the use of the HTTP GET method. oauth is an instance of our 'client'. Calling createOAuthRequest generates an OAuth request object. This is an abstraction and can't actually be used on it's own to make a HTTP request. It can be used to generate the headers and URL needed to make a HTTP request. We use the method toURLString from the RequestUtils class to create a simple URL containing the params + OAuth params. This is the simplest way to get a self contained URL that can be used in a request to an OAuth service.