diff options
| author | Carlos Marin <carlos.marin@rackspace.com> | 2011-10-12 17:44:12 -0500 |
|---|---|---|
| committer | Carlos Marin <carlos.marin@rackspace.com> | 2011-10-14 11:19:39 -0500 |
| commit | 85a49ae61279f10318adf80b1ca9c33fdf1fa1df (patch) | |
| tree | 580d5f429b4b5cba3986736a45ba13048c2358d2 | |
| parent | 70da539b77188bee8396f1d6d56f37b228020f1b (diff) | |
First commit for Secret Question and Answer Extension: RAX-KSQA
Changed: POST to PUT on create/update Secret Q&A.
Change-Id: I0f8130ac0daf59f660a7deadf5091202cf0e93db
| -rw-r--r-- | keystone/content/admin/RAX-KSQA-admin.wadl | 106 | ||||
| -rw-r--r-- | keystone/content/common/samples/RAX-KSQA-secretQA.json | 6 | ||||
| -rw-r--r-- | keystone/content/common/samples/RAX-KSQA-secretQA.xml | 7 | ||||
| -rw-r--r-- | keystone/content/common/xsd/RAX-KSQA-secretQA.xsd | 47 |
4 files changed, 166 insertions, 0 deletions
diff --git a/keystone/content/admin/RAX-KSQA-admin.wadl b/keystone/content/admin/RAX-KSQA-admin.wadl new file mode 100644 index 00000000..88470315 --- /dev/null +++ b/keystone/content/admin/RAX-KSQA-admin.wadl @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!-- (C) 2011 OpenStack LLC., All Rights Reserved -->
+<!--*******************************************************-->
+<!-- Import Common XML Entities -->
+<!-- -->
+<!-- You can resolve the entites with xmllint -->
+<!-- -->
+<!-- xmllint -noent RAX-KSQA-admin.wadl -->
+<!--*******************************************************-->
+<!DOCTYPE application [
+<!ENTITY % common SYSTEM "../common/common.ent">
+%common;
+]>
+<application xmlns="http://wadl.dev.java.net/2009/02"
+ xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
+ xmlns:RAX-KSQA="http://docs.openstack.org/identity/api/ext/RAX-KSQA/v1.0"
+ xmlns:capi="http://docs.openstack.org/common/api/v1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
+ xsi:schemaLocation="http://docs.openstack.org/identity/api/v2.0 ../common/xsd/api.xsd
+ http://docs.openstack.org/common/api/v1.0 ../common/xsd/api-common.xsd
+ http://wadl.dev.java.net/2009/02 http://www.w3.org/Submission/wadl/wadl.xsd
+ http://docs.openstack.org/identity/api/ext/RAX-KSQA/v1.0 ../common/xsd/RAX-KSQA-secretQA.xsd
+ ">
+
+ <grammars>
+ <include href="../common/xsd/api.xsd"/>
+ <include href="../common/xsd/api-common.xsd"/>
+ <include href="../common/xsd/RAX-KSQA-secretQA.xsd"/>
+ </grammars>
+ <!--*******************************************************-->
+ <!-- All Resoruces -->
+ <!--*******************************************************-->
+
+ <!-- We should use SSL in production -->
+ <resources base="http://localhost:35357">
+ <resource id="version" path="v2.0">
+ <param name="X-Auth-Token" style="header" type="xsd:string" required="true">
+ <doc>You need a valid admin token for access.</doc>
+ </param>
+ <resource id="users" path="users">
+ <resource id="userById" path="{userId}">
+ <param name="userId" style="template" type="xsd:string"/>
+ <resource id="user-RAX-KSQA" path="RAX-KSQA">
+ <resource id="secretqa" path="secretqa">
+ <method href="#getUserSecretQA"/>
+ <method href="#updateUserSecretQA"/>
+ </resource>
+ </resource>
+ </resource>
+ </resource>
+ </resource>
+ </resources>
+
+ <method name="GET" id="getUserSecretQA">
+ <doc xml:lang="EN" title="Get User SecretQA">
+ <p xmlns="http://www.w3.org/1999/xhtml">Gets a User secret Question and Answer.</p>
+ </doc>
+ <response status="200 203">
+ <representation mediaType="application/xml" element="RAX-KSQA:secretQA">
+ <doc xml:lang="EN">
+ <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.xml"/>
+ </doc>
+ </representation>
+ <representation mediaType="application/json">
+ <doc xml:lang="EN">
+ <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.json"/>
+ </doc>
+ </representation>
+ </response>
+ &commonFaults;
+ &getFaults;
+ </method>
+ <method name="PUT" id="updateUserSecretQA">
+ <doc xml:lang="EN" title="Update User SecretQA">
+ <p xmlns="http://www.w3.org/1999/xhtml">Updates a User secret Question and Answer.</p>
+ </doc>
+ <request>
+ <representation mediaType="application/xml" element="RAX-KSQA:secretQA">
+ <doc xml:lang="EN">
+ <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.xml"/>
+ </doc>
+ </representation>
+ <representation mediaType="application/json">
+ <doc xml:lang="EN">
+ <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.json"/>
+ </doc>
+ </representation>
+ </request>
+ <response status="200">
+ <representation mediaType="application/xml" element="RAX-KSQA:secretQA">
+ <doc xml:lang="EN">
+ <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.xml"/>
+ </doc>
+ </representation>
+ <representation mediaType="application/json">
+ <doc xml:lang="EN">
+ <xsdxt:code href="../common/samples/RAX-KSQA-secretQA.json"/>
+ </doc>
+ </representation>
+ </response>
+ &commonFaults;
+ &postPutFaults;
+ </method>
+ </application>
diff --git a/keystone/content/common/samples/RAX-KSQA-secretQA.json b/keystone/content/common/samples/RAX-KSQA-secretQA.json new file mode 100644 index 00000000..9e003c8b --- /dev/null +++ b/keystone/content/common/samples/RAX-KSQA-secretQA.json @@ -0,0 +1,6 @@ +{ + "RAX-KSQA:secretQA":{ + "question":"What is the color of my eyes?", + "answer":"Leonardo Da Vinci" + } +} diff --git a/keystone/content/common/samples/RAX-KSQA-secretQA.xml b/keystone/content/common/samples/RAX-KSQA-secretQA.xml new file mode 100644 index 00000000..c6570af6 --- /dev/null +++ b/keystone/content/common/samples/RAX-KSQA-secretQA.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<secretQA xmlns="http://docs.rackspace.com/identity/api/ext/RAX-KSQA/v1.0" + question="What is the color of my eyes?" + answer="Leonardo Da Vinci" /> + + diff --git a/keystone/content/common/xsd/RAX-KSQA-secretQA.xsd b/keystone/content/common/xsd/RAX-KSQA-secretQA.xsd new file mode 100644 index 00000000..80ed17d0 --- /dev/null +++ b/keystone/content/common/xsd/RAX-KSQA-secretQA.xsd @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?> + +<schema + elementFormDefault="qualified" + attributeFormDefault="unqualified" + xmlns="http://www.w3.org/2001/XMLSchema" + xmlns:identity="http://docs.openstack.org/identity/api/v2.0" + xmlns:RAX-KSQA="http://docs.rackspace.com/identity/api/ext/RAX-KSQA/v1.0" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" + xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0" + xmlns:atom="http://www.w3.org/2005/Atom" + targetNamespace="http://docs.rackspace.com/identity/api/ext/RAX-KSQA/v1.0" + > + + <!-- Elements --> + <element name="secretQA" type="RAX-KSQA:SecretQA"/> + + <!-- Complex Types --> + <complexType name="SecretQA"> + <annotation> + <xsd:documentation xml:lang="EN" xmlns="http://www.w3.org/1999/xhtml"> + <p> + A Secret Question and Answer. The answer shall serve to prove + the user's identity as it should only be able to be answered + by the user who proposed the question. + </p> + </xsd:documentation> + <xsd:appinfo> + <xsdxt:samples> + <xsdxt:sample> + <xsdxt:code type="application/xml" href="../samples/RAX-KSQA-secretQA.xml" /> + </xsdxt:sample> + <xsdxt:sample> + <xsdxt:code type="application/json" href="../samples/RAX-KSQA-secretQA.json" /> + </xsdxt:sample> + </xsdxt:samples> + </xsd:appinfo> + </annotation> + <attribute name="question" type="xsd:string" use="optional"/> + <attribute name="answer" type="xsd:string" use="optional"/> + <anyAttribute namespace="##other" processContents="lax"/> + </complexType> + +</schema> + |
