2 @mainpage OAuth library functions
4 @section intro Introduction
6 liboauth is a collection of POSIX-c functions implementing the <a href="http://oauth.net/">OAuth</a> Core <a href="http://tools.ietf.org/html/rfc5849">RFC 5849</a> standard.
7 liboauth provides functions to escape and encode parameters according to OAuth specification and offers high-level functionality to sign requests or verify OAuth signatures as well as perform HTTP requests.
9 liboauth depends on either on the <a href="http://openssl.org/">OpenSSL</a> library or on
10 <a href="http://www.mozilla.org/projects/security/pki/nss/">NSS</a> (Mozilla's Network Security Services)
11 , which are used for generating the hash/signature, and optionally <a href="http://curl.haxx.se/libcurl/c/">libcurl</a> for issuing HTTP requests.
13 The source includes example code and a self-tests based on <a href="http://wiki.oauth.net/TestCases">http://wiki.oauth.net/TestCases</a>. The library has been tested against the http://oauth-sandbox.mediamatic.nl (now offline) and http://term.ie/oauth/example test servers using commandline-cURL, libcurl and a QT4.3.2 QHttp C++ application on win32 (mingw), gnu/Linux and Mac/OSX.
15 @section installation Installation
16 The source is debianized. On Debian systems <tt>debian-buildpackage</tt> can be used to compile and <tt>dpkg -i</tt> to install <em>liboauth</em> and <em>liboauth-dev</em> packages.
18 liboauth uses autotools and libtools. The tar.gz package includes the <tt>configure</tt> script, but if you get the source from the repository, you first need to generate the build environment with something alike:
19 <tt>aclocal; autoheader; libtoolize --copy; autoconf; automake --gnu --add-missing --copy</tt>. (<i>OSX users use <tt>glibtoolize</tt></i>).
21 run <tt>./configure</tt> and build liboauth with <tt>make</tt>. see the INSTALL file for further instructions on gnu autotools.
23 run <tt>./configure --help</tt> for information on optional features (<tt>--disable-curl</tt>, <tt>--disable-libcurl</tt>, <tt>--enable-nss</tt>, <tt>--with-curltimeout[=<int>]</tt>).
25 If <a href="http://www.stack.nl/~dimitri/doxygen/">Doxygen</a> is available, the documentation can be rendered from the source by calling <tt>make dox</tt>. The http://wiki.oauth.net/TestCases scenarios in the example code can be run with <tt>make check</tt>.
28 Consult \ref oauth.h for a detailed reference of available functions. This documentation is also available as unix manual page: <tt>man 3 oauth</tt>.
30 See <tt>tests/oauthtest.c</tt> for the self-test code and example. <tt>tests/oauthexample.c</tt> implements a simple hardcoded OAuth-consumer.
31 If you simply want to calculate the OAuth-signature, all you need is \ref oauth_sign_url.
32 Future releases might include more elaborate usage information: Feel free to ask questions.
34 <a href="http://gareus.org/oss/oauth/">oauth-utils</a> includes a command-line OAuth-consumer and signature-verification tool using liboauth.
36 @section usage Built-in HTTP client
37 The curl wrapper interface should never have been part of libOauth. It came in handy during initial development and test deployments, and by the time I wanted to remove it, there were already too many users...
39 It is still convenient for self-tests and getting started, but application developers should rather aim for a dedicated optimized implementation appropriate for each app.
41 oauth_http.c does not do any error-handling for instance, also SSL certificate checking and/or similar CURL options depend on the use-case at hand. Furthermore the available curl options and parameters in oauth_http.c are limited.
43 Therefore with the release of version 1.0.0 <strong>all <tt>oauth_http</tt> functions</strong> have been marked as <strong>deprecated</strong>.
45 Developers of applications using <tt>oauth_http.c</tt> are advised to simply copy the relevent code into their application (the MIT license is very permissive) and adopt it, if neccesary.
47 @section download Download
49 Download Source: <a href="http://sourceforge.net/projects/liboauth/files/liboauth-@VERSION@.tar.gz/download">liboauth-@VERSION@.tar.gz</a>
50 <a href="https://raw.github.com/x42/liboauth/master/ChangeLog">Changelog</a>.
52 liboauth is maintained at github:
53 <a href="https://github.com/x42/liboauth">liboauth repository</a> and mirrored at the <a href="http://oauth.googlecode.com/svn/code/c/liboauth/">OAuth googlecode SVN repository</a>.
56 The development branch is available from <tt>git://gareus.org/liboauth</tt> or download a <a href="http://gareus.org/gitweb/?p=liboauth.git;a=snapshot;h=head">snapshot</a>.
60 Send bug reports, patches or suggestions to robin @ gareus . org.
62 Ask the <a href="http://oauth.net/community/">oauth-community</a> or join the <a href="http://groups.google.com/group/oauth/">mailing list</a> for discussion.
64 @section license License
65 The source-code of liboauth can be distributed under <a href="http://www.opensource.org/licenses/mit-license.php">MIT License</a>,
66 or at your option in terms of the the <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License</a>.
68 Note: OpenSSL is not strictly compatible with the GPL license.
69 An exemption (to the GPL) allowing to link and redistribute liboauth with the OpenSSL library is is included in the source files.
70 More information is available in the
71 <a href="http://liboauth.svn.sourceforge.net/viewvc/liboauth/trunk/README?revision=HEAD&view=markup">README</a>.
72 You can avoid this whole issue by using NSS instead of OpenSSL, configuring liboauth with <tt>--enable-nss</tt>.
74 The Debian packaging that comes with the source-code is licensed under the GNU General Public License.
76 MIT License (source-code):
78 Copyright 2007-2012 Robin Gareus
80 Permission is hereby granted, free of charge, to any person obtaining a copy
81 of this software and associated documentation files (the "Software"), to deal
82 in the Software without restriction, including without limitation the rights
83 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
84 copies of the Software, and to permit persons to whom the Software is
85 furnished to do so, subject to the following conditions:
87 The above copyright notice and this permission notice shall be included in
88 all copies or substantial portions of the Software.
90 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
91 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
92 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
93 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
94 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
95 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
99 GPL (Debian packaging and alternative source-code license):
101 This package is free software; you can redistribute it and/or
102 modify it under the terms of the GNU General Public
103 License as published by the Free Software Foundation; either
104 version 2 of the License, or (at your option) any later version.
106 This package is distributed in the hope that it will be useful,
107 but WITHOUT ANY WARRANTY; without even the implied warranty of
108 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
109 General Public License for more details.
111 You should have received a copy of the GNU General Public
112 License along with this package; if not, write to the Free Software
113 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
116 \example tests/oauthtest.c
117 \example tests/oauthtest2.c
118 \example tests/oauthexample.c
119 \example tests/oauthbodyhash.c
120 \example tests/selftest_wiki.c