-
Notifications
You must be signed in to change notification settings - Fork 7
Trying to explain the motivation for this library to a fellow (fictional) programmer
Scribe is a simple and extensible OAuth library for Java. It’s goals are to be as simple as possible and to support a huge number (ideally all) of APIs.
Mostly because other libraries don’t work with all APIs. It’s not the lib’s authors fault, but a mixture of the OAuth spec not being strict enough and some API developers adding arbitrary (and incompatible) rules.
Scribe embraces the idea of convention over configuration. If your API is quite standard, this library will work out-of-the box. You just need to specify the Request Token and Access Token URLs.
If you are using a non-standard API, you might need to create an Equalizer
Why don’t you take care of the configuration internally instead of making me and all others code that stuff?
This design decision has two reasons:
- The differences between APIs are very… well… different. For example, LinkedIn’s OAuth implementation requires that if you have a ~ character on your URL (and you sure will have one), that character should not be URL-encoded. There’s simply no way of handling all actual API differences, and support all future ones too.
- The library code would be bloated with conditionals and other nasty things. It would be a mess. I do not like ugly code, and neither should you.
You probably won’t need to. Scribe comes with some default equalizers out-of-the box, and the idea is to support all major ones in a short time.
If you find Scribe does not work with the APIs you want file a ticket tagged feature and I’ll take care of it.
Or even better, fork the code and contribute it creating your own Equalizers! I try to keep the code clean, and it should be easy even for beginners to collaborate.
Go read the Getting Started page. That should get you up and running.
Happy coding!