summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge L. Williams <jorge.williams@rackspace.com>2011-08-19 15:55:56 -0500
committerJorge L. Williams <jorge.williams@rackspace.com>2011-08-19 16:10:36 -0500
commit95cb22bfa29ce3bf5abed3f9fbe96559e9e1107f (patch)
tree2731df779ed2ae2dd2190c62b167462a3fd1a651
parent7243c2902376ce9dd13d73830f68505cbe0ce267 (diff)
downloadkeystone-95cb22bfa29ce3bf5abed3f9fbe96559e9e1107f.tar.gz
keystone-95cb22bfa29ce3bf5abed3f9fbe96559e9e1107f.tar.xz
keystone-95cb22bfa29ce3bf5abed3f9fbe96559e9e1107f.zip
Reworked XSDs and WADL to support auth and access elements.
Change-Id: Ibf8cd4311eb56fbd8d2386be7f65ac800e09518c
-rw-r--r--keystone/content/service/identity.wadl4
-rw-r--r--keystone/content/service/xsd/credentials.xsd70
-rw-r--r--keystone/content/service/xsd/token.xsd4
3 files changed, 43 insertions, 35 deletions
diff --git a/keystone/content/service/identity.wadl b/keystone/content/service/identity.wadl
index 470495fe..b214e3ef 100644
--- a/keystone/content/service/identity.wadl
+++ b/keystone/content/service/identity.wadl
@@ -144,11 +144,11 @@
</p>
</wadl:doc>
<request>
- <representation mediaType="application/xml" element="identity:passwordCredentials"/>
+ <representation mediaType="application/xml" element="identity:auth"/>
<representation mediaType="application/json"/>
</request>
<response status="200 203">
- <representation mediaType="application/xml" element="identity:authenticateResponse"/>
+ <representation mediaType="application/xml" element="identity:access"/>
<representation mediaType="application/json"/>
</response>
<response status="403">
diff --git a/keystone/content/service/xsd/credentials.xsd b/keystone/content/service/xsd/credentials.xsd
index 1dcbb815..468dc954 100644
--- a/keystone/content/service/xsd/credentials.xsd
+++ b/keystone/content/service/xsd/credentials.xsd
@@ -14,36 +14,46 @@
xmlns:atom="http://www.w3.org/2005/Atom"
targetNamespace="http://docs.openstack.org/identity/api/v2.0"
>
-
- <!-- Import ATOM specific schema definitions -->
- <import vc:minVersion="1.1" namespace="http://www.w3.org/2005/Atom"
- schemaLocation="atom/atom.xsd" />
-
<!-- Elements -->
- <element name="passwordCredentials" type="identity:PasswordCredentials"/>
+ <element name="auth" type="identity:AuthenticationRequest"/>
- <element name="credentials" type="identity:CredentialList" >
+ <!-- Complex Types -->
+ <complexType name="CredentialType" abstract="true">
<annotation>
<xsd:documentation
- xml:lang="EN"
- xmlns="http://www.w3.org/2001/XMLSchema">
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
<p>
- A list of credentials.
+ Base type for credentials in Keystone.
</p>
</xsd:documentation>
</annotation>
- </element>
-
- <!-- Complex Types -->
- <complexType name="Credential" abstract="true">
- <attribute name="id" type="xsd:ID" use="optional"/>
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </sequence>
<anyAttribute namespace="##other" processContents="lax"/>
</complexType>
- <complexType name="CredentialType" abstract="true">
- <anyAttribute namespace="##other" processContents="lax"/>
+ <complexType name="AuthenticationRequest">
+ <sequence>
+ <choice minOccurs="1">
+ <element name="passwordCredentials" type="identity:PasswordCredentialsBase"/>
+ <any namespace="##other" processContents="lax">
+ <annotation>
+ <xsd:documentation
+ xml:lang="EN"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ This is reserved for other credential types.
+ </p>
+ </xsd:documentation>
+ </annotation>
+ </any>
+ </choice>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="tenantId" type="xsd:string"/>
</complexType>
-
- <complexType name="PasswordCredentials">
+ <complexType name="PasswordCredentialsBase">
<complexContent>
<extension base="identity:CredentialType">
<attribute name="username" type="xsd:string" use="optional" />
@@ -51,22 +61,20 @@
</extension>
</complexContent>
</complexType>
-
+ <complexType name="PasswordCredentialsWithoutUsernameAndTenant">
+ <complexContent>
+ <restriction base="identity:PasswordCredentialsBase">
+ <attribute name="username" type="xsd:string" use="prohibited" />
+ <attribute name="password" type="xsd:string" use="required" />
+ </restriction>
+ </complexContent>
+ </complexType>
<complexType name="PasswordCredentialsRequiredUsername">
<complexContent>
<restriction base="identity:PasswordCredentialsBase">
<attribute name="username" type="xsd:string" use="required" />
+ <attribute name="password" type="xsd:string" use="required" />
</restriction>
</complexContent>
- </complexType>
-
- <complexType name="CredentialList">
- <sequence>
- <element name="credential" type="identity:Credential" minOccurs="0" maxOccurs="unbounded"/>
- <!-- TODO(Ziad): resolve conflict <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs="unbounded" />-->
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
- </sequence>
- <anyAttribute namespace="##other" processContents="lax"/>
- </complexType>
-
+ </complexType>
</schema>
diff --git a/keystone/content/service/xsd/token.xsd b/keystone/content/service/xsd/token.xsd
index 45cdf743..efa85497 100644
--- a/keystone/content/service/xsd/token.xsd
+++ b/keystone/content/service/xsd/token.xsd
@@ -13,11 +13,11 @@
targetNamespace="http://docs.openstack.org/identity/api/v2.0"
>
<include schemaLocation="roles.xsd"/>
- <include schemaLocation="token.xsd"/>
<include schemaLocation="user.xsd"/>
+ <include schemaLocation="credentials.xsd"/>
<!-- Elements -->
- <element name="auth" type="identity:AuthenticateResponse"/>
+ <element name="access" type="identity:AuthenticateResponse"/>
<!-- Complex Types -->
<complexType name="Token">