diff options
| author | Carlos Marin <carlos.marin@rackspace.com> | 2011-09-22 18:09:47 -0500 |
|---|---|---|
| committer | Carlos Marin <carlos.marin@rackspace.com> | 2011-09-23 11:40:35 -0500 |
| commit | 5056464e73399ae9e4daeee92d10f61bbfe0d510 (patch) | |
| tree | c8c8e7841ffe453fd6dc91ba8ba400cdb85c1d3c | |
| parent | 019b3348f21dc59ebae0b629eb374ac3bf305a5d (diff) | |
Modified apiKeyCredentials to extend single entity and use restriction
Added samples and WADL updated with this change.
Change-Id: Ia4334827e6acae9eba433f21016b9d7edd28bc64
| -rw-r--r-- | keystone/content/admin/RAX-KSKEY-admin.wadl | 23 | ||||
| -rw-r--r-- | keystone/content/common/samples/apiKeyCredentials.json (renamed from keystone/content/common/samples/apikeyCredentials.json) | 2 | ||||
| -rw-r--r-- | keystone/content/common/samples/apiKeyCredentials.xml (renamed from keystone/content/common/samples/apikeyCredentials.xml) | 2 | ||||
| -rw-r--r-- | keystone/content/common/samples/auth_credentials-RAX-KSKEY.json | 2 | ||||
| -rw-r--r-- | keystone/content/common/samples/auth_credentials-RAX-KSKEY.xml | 2 | ||||
| -rw-r--r-- | keystone/content/common/samples/credentialswithapikey.json | 2 | ||||
| -rw-r--r-- | keystone/content/common/samples/credentialswithapikey.xml | 2 | ||||
| -rw-r--r-- | keystone/content/common/xsd/RAX-KSKEY-credentials.xsd | 29 |
8 files changed, 38 insertions, 26 deletions
diff --git a/keystone/content/admin/RAX-KSKEY-admin.wadl b/keystone/content/admin/RAX-KSKEY-admin.wadl index 7e37775b..3285d4b3 100644 --- a/keystone/content/admin/RAX-KSKEY-admin.wadl +++ b/keystone/content/admin/RAX-KSKEY-admin.wadl @@ -45,7 +45,7 @@ <resource id="userCredentials" path="credentials"> <method href="#addUserCredential"/> <method href="#listCredentials"/> - <resource id="userCredentialsByType" path="RAX-KSKEY:apikeyCredentials"> + <resource id="userCredentialsByType" path="RAX-KSKEY:apiKeyCredentials"> <method href="#updateUserCredential"/> <method href="#deleteUserCredential"/> <method href="#getUserCredential"/> @@ -68,24 +68,24 @@ <request> <representation mediaType="application/xml" element="identity:credentials"> <doc xml:lang="EN"> - <xsdxt:code href="../common/samples/apikeyCredentials.xml"/> + <xsdxt:code href="../common/samples/apiKeyCredentials.xml"/> </doc> </representation> <representation mediaType="application/json"> <doc xml:lang="EN"> - <xsdxt:code href="../common/samples/apikeyCredentials.json"/> + <xsdxt:code href="../common/samples/apiKeyCredentials.json"/> </doc> </representation> </request> <response status="201"> <representation mediaType="application/xml" element="identity:credentials"> <doc xml:lang="EN"> - <xsdxt:code href="../common/samples/apikeyCredentials.xml"/> + <xsdxt:code href="../common/samples/apiKeyCredentials.xml"/> </doc> </representation> <representation mediaType="application/json"> <doc xml:lang="EN"> - <xsdxt:code href="../common/samples/apikeyCredentials.json"/> + <xsdxt:code href="../common/samples/apiKeyCredentials.json"/> </doc> </representation> </response> @@ -150,24 +150,24 @@ <request> <representation mediaType="application/xml" element="identity:credentials"> <doc xml:lang="EN"> - <xsdxt:code href="../common/samples/apikeyCredentials.xml"/> + <xsdxt:code href="../common/samples/apiKeyCredentials.xml"/> </doc> </representation> <representation mediaType="application/json"> <doc xml:lang="EN"> - <xsdxt:code href="../common/samples/apikeyCredentials.json"/> + <xsdxt:code href="../common/samples/apiKeyCredentials.json"/> </doc> </representation> </request> <response status="200"> <representation mediaType="application/xml" element="identity:credentials"> <doc xml:lang="EN"> - <xsdxt:code href="../common/samples/apikeyCredentials.xml"/> + <xsdxt:code href="../common/samples/apiKeyCredentials.xml"/> </doc> </representation> <representation mediaType="application/json"> <doc xml:lang="EN"> - <xsdxt:code href="../common/samples/apikeyCredentials.json"/> + <xsdxt:code href="../common/samples/apiKeyCredentials.json"/> </doc> </representation> </response> @@ -193,12 +193,12 @@ <response status="200 203"> <representation mediaType="application/xml" element="identity:credentials"> <doc xml:lang="EN"> - <xsdxt:code href="../common/samples/apikeyCredentials.xml"/> + <xsdxt:code href="../common/samples/apiKeyCredentials.xml"/> </doc> </representation> <representation mediaType="application/json"> <doc xml:lang="EN"> - <xsdxt:code href="../common/samples/apikeyCredentials.json"/> + <xsdxt:code href="../common/samples/apiKeyCredentials.json"/> </doc> </representation> </response> @@ -206,3 +206,4 @@ &getFaults; </method> </application> + diff --git a/keystone/content/common/samples/apikeyCredentials.json b/keystone/content/common/samples/apiKeyCredentials.json index 2312907c..e55d3794 100644 --- a/keystone/content/common/samples/apikeyCredentials.json +++ b/keystone/content/common/samples/apiKeyCredentials.json @@ -1,5 +1,5 @@ { - "RAX-KSKEY:apikeyCredentials":{ + "RAX-KSKEY:apiKeyCredentials":{ "username":"test_user", "apikey":"aaaaa-bbbbb-ccccc-12345678" } diff --git a/keystone/content/common/samples/apikeyCredentials.xml b/keystone/content/common/samples/apiKeyCredentials.xml index d3ba87bd..eada92c9 100644 --- a/keystone/content/common/samples/apikeyCredentials.xml +++ b/keystone/content/common/samples/apiKeyCredentials.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<apikeyCredentials +<apiKeyCredentials xmlns="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0" username="testuser" apikey="aaaaa-bbbbb-ccccc-12345678"/> diff --git a/keystone/content/common/samples/auth_credentials-RAX-KSKEY.json b/keystone/content/common/samples/auth_credentials-RAX-KSKEY.json index e07c6bf8..a80b9d03 100644 --- a/keystone/content/common/samples/auth_credentials-RAX-KSKEY.json +++ b/keystone/content/common/samples/auth_credentials-RAX-KSKEY.json @@ -1,6 +1,6 @@ { "auth":{ - "RAX-KSKEY:apikeyCredentials":{ + "RAX-KSKEY:apiKeyCredentials":{ "username":"test_user", "apikey":"aaaaa-bbbbb-ccccc-12345678" }, diff --git a/keystone/content/common/samples/auth_credentials-RAX-KSKEY.xml b/keystone/content/common/samples/auth_credentials-RAX-KSKEY.xml index 0fd76c9c..908049bb 100644 --- a/keystone/content/common/samples/auth_credentials-RAX-KSKEY.xml +++ b/keystone/content/common/samples/auth_credentials-RAX-KSKEY.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <auth xmlns="http://docs.openstack.org/identity/api/v2.0"> - <apikeyCredentials + <apiKeyCredentials xmlns="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0" username="testuser" apikey="aaaaa-bbbbb-ccccc-12345678"/> diff --git a/keystone/content/common/samples/credentialswithapikey.json b/keystone/content/common/samples/credentialswithapikey.json index c0c494c1..dce4a9b4 100644 --- a/keystone/content/common/samples/credentialswithapikey.json +++ b/keystone/content/common/samples/credentialswithapikey.json @@ -6,7 +6,7 @@ } }, { - "RAX-KSKEY:apikeyCredentials":{ + "RAX-KSKEY:apiKeyCredentials":{ "username":"test_user", "apikey":"aaaaa-bbbbb-ccccc-12345678" } diff --git a/keystone/content/common/samples/credentialswithapikey.xml b/keystone/content/common/samples/credentialswithapikey.xml index 2074629d..5349e572 100644 --- a/keystone/content/common/samples/credentialswithapikey.xml +++ b/keystone/content/common/samples/credentialswithapikey.xml @@ -2,7 +2,7 @@ <credentials xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://docs.openstack.org/identity/api/v2.0"> <passwordCredentials username="test_user" password="test"/> - <apikeyCredentials + <apiKeyCredentials xmlns="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0" username="testuser" apikey="aaaaa-bbbbb-ccccc-12345678"/> diff --git a/keystone/content/common/xsd/RAX-KSKEY-credentials.xsd b/keystone/content/common/xsd/RAX-KSKEY-credentials.xsd index 24f1fe0e..69f5ce10 100644 --- a/keystone/content/common/xsd/RAX-KSKEY-credentials.xsd +++ b/keystone/content/common/xsd/RAX-KSKEY-credentials.xsd @@ -18,24 +18,35 @@ schemaLocation="credentials.xsd"/> <!-- Elements --> - <element name="apikeyCredentials" type="RAX-KSKEY:apikeyCredentialsWithUsername" substitutionGroup="identity:credential"/> + <element name="apiKeyCredentials" type="RAX-KSKEY:apiKeyCredentials" substitutionGroup="identity:credential"/> <!-- Complex Types --> - <complexType name="apikeyCredentials"> + <complexType name="apiKeyCredentials"> <complexContent> <extension base="identity:CredentialType"> - <attribute name="apikey" type="xsd:string" use="required" ></attribute> + <attribute name="username" type="xsd:string" use="optional" ></attribute> + <attribute name="apiKey" type="xsd:string" use="required" ></attribute> </extension> </complexContent> </complexType> - <complexType name="apikeyCredentialsWithUsername"> + <complexType name="apiKeyCredentialsWithOnlyApiKey"> <complexContent> - <extension base="identity:CredentialType"> - <attribute name="username" type="xsd:string" use="required" ></attribute> - <attribute name="apikey" type="xsd:string" use="required" ></attribute> - </extension> + <restriction base="RAX-KSKEY:apiKeyCredentials"> + <attribute name="username" type="xsd:string" use="prohibited"/> + <attribute name="apiKey" type="xsd:string" use="required" > + <annotation> + <xsd:documentation + xml:lang="EN" + xmlns="http://www.w3.org/1999/xhtml"> + <p> + The user's API Key. + </p> + </xsd:documentation> + </annotation> + </attribute> + </restriction> </complexContent> </complexType> -</schema> +</schema> |
