couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [18/32] git commit: updated refs/heads/1781-reorganize-and-improve-docs to 11fd32a
Date Fri, 14 Jun 2013 08:25:15 GMT
Describe oauth and couch_httpd_oauth config sections.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/16defb18
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/16defb18
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/16defb18

Branch: refs/heads/1781-reorganize-and-improve-docs
Commit: 16defb18dd0b88fb1bfbecff35cd2f0b761e40f4
Parents: 0037292
Author: Alexander Shorin <kxepal@apache.org>
Authored: Wed Jun 12 15:21:08 2013 +0400
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Wed Jun 12 16:06:30 2013 +0400

----------------------------------------------------------------------
 share/doc/build/Makefile.am    |  3 ++
 share/doc/src/config/index.rst |  1 +
 share/doc/src/config/oauth.rst | 90 +++++++++++++++++++++++++++++++++++++
 3 files changed, 94 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/16defb18/share/doc/build/Makefile.am
----------------------------------------------------------------------
diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am
index d1baa84..d9bb43d 100644
--- a/share/doc/build/Makefile.am
+++ b/share/doc/build/Makefile.am
@@ -64,6 +64,7 @@ html_files = \
     html/_sources/config/httpd.txt \
     html/_sources/config/index.txt \
     html/_sources/config/native-query-servers.txt \
+    html/_sources/config/oauth.txt \
     html/_sources/config/os-daemons.txt \
     html/_sources/config/query-servers.txt \
     html/_sources/config/replicator.txt \
@@ -127,6 +128,7 @@ html_files = \
     html/config/httpd.html \
     html/config/index.html \
     html/config/native-query-servers.html \
+    html/config/oauth.html \
     html/config/os-daemons.html \
     html/config/query-servers.html \
     html/config/replicator.html \
@@ -188,6 +190,7 @@ src_files = \
     ../src/config/httpd.rst \
     ../src/config/index.rst \
     ../src/config/native-query-servers.rst \
+    ../src/config/oauth.rst \
     ../src/config/os-daemons.rst \
     ../src/config/query-servers.rst \
     ../src/config/replicator.rst \

http://git-wip-us.apache.org/repos/asf/couchdb/blob/16defb18/share/doc/src/config/index.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/index.rst b/share/doc/src/config/index.rst
index 2eec13c..0cf0da4 100644
--- a/share/doc/src/config/index.rst
+++ b/share/doc/src/config/index.rst
@@ -57,6 +57,7 @@ Content:
    daemons
    httpd
    native-query-servers
+   oauth
    os-daemons
    query-servers
    replicator

http://git-wip-us.apache.org/repos/asf/couchdb/blob/16defb18/share/doc/src/config/oauth.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/oauth.rst b/share/doc/src/config/oauth.rst
new file mode 100644
index 0000000..91bc276
--- /dev/null
+++ b/share/doc/src/config/oauth.rst
@@ -0,0 +1,90 @@
+.. Licensed under the Apache License, Version 2.0 (the "License"); you may not
+.. use this file except in compliance with the License. You may obtain a copy of
+.. the License at
+..
+..   http://www.apache.org/licenses/LICENSE-2.0
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+.. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+.. License for the specific language governing permissions and limitations under
+.. the License.
+
+.. highlight:: ini
+
+.. _config/oauth:
+
+``[oauth]`` :: OAuth Configuration
+==================================
+
+.. _config/oauth/oauth_consumer_secrets:
+.. _config/oauth/oauth_token_secrets:
+.. _config/oauth/oauth_token_users:
+
+Store credentials within config
+-------------------------------
+
+To let users be authenticated by `OAuth` (:rfc:`5849`) method there is need to
+setup three special sections in :ref:`configuration <config>` file:
+
+1. Consumer secret:
+
+::
+
+  [oauth_consumer_secrets]
+  example.com = sekr1t
+
+2. Token secrets:
+
+::
+
+  [oauth_token_secrets]
+  token1 = tokensekr1t
+
+3. Tokens to users mapping:
+
+::
+
+  [oauth_token_users]
+  token1 = couchdb_username
+
+
+.. _config/couch_httpd_oauth:
+.. _config/couch_httpd_oauth/use_users_db:
+
+Store OAuth credentials within auth database
+--------------------------------------------
+
+.. versionadded:: 1.2: CouchDB is able to store OAuth credentials within users
+   documents instead of config file.
+
+::
+
+  [couch_httpd_oauth]
+  use_users_db = true
+
+If set to ``true``, OAuth token and consumer secrets will be looked up
+in the authentication database (``_user``). These secrets are stored in
+a top level field named ``"oauth"`` in user documents. Example:
+
+.. code-block:: javascript
+
+    {
+        "_id": "org.couchdb.user:joe",
+        "type": "user",
+        "name": "joe",
+        "password_sha": "fe95df1ca59a9b567bdca5cbaf8412abd6e06121",
+        "salt": "4e170ffeb6f34daecfd814dfb4001a73"
+        "roles": ["foo", "bar"],
+        "oauth": {
+            "consumer_keys": {
+                "consumerKey1": "key1Secret",
+                "consumerKey2": "key2Secret"
+            },
+            "tokens": {
+                "token1": "token1Secret",
+                "token2": "token2Secret"
+           }
+        }
+    }
+


Mime
View raw message