blob: 22283184712fc8ba02b6f591dc619ed9383cf1c7 [file] [log] [blame]
Sai Gandham34e9cfe2018-04-09 20:43:47 +00001<!--
2 * ============LICENSE_START====================================================
3 * org.onap.aaf
4 * ===========================================================================
5 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6 * ===========================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END====================================================
19 *
20-->
21<xs:schema
22 xmlns:xs="http://www.w3.org/2001/XMLSchema"
23 xmlns:aafoauth="urn:aafoauth:v2_0"
24 targetNamespace="urn:aafoauth:v2_0"
25 elementFormDefault="qualified">
26
27
28 <!-- Definition of a GUID found several places on WEB, 5/24/2017
29 Developed a HexToken instead
30 <xs:simpleType name="guid">
31 <xs:annotation>
32 <xs:documentation xml:lang="en">
33 The representation of a GUID, generally the id of an element.
34 </xs:documentation>
35 </xs:annotation>
36 <xs:restriction base="xs:string">
37 <xs:pattern value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>
38 </xs:restriction>
39 </xs:simpleType>
40 -->
41
42 <!-- fill this out
43 <xs:simpleType name="scope">
44 <xs:annotation>
45 <xs:documentation xml:lang="en">
46 The representation of a GUID, generally the id of an element.
47 </xs:documentation>
48 </xs:annotation>
49 <xs:restriction base="xs:string">
50 <xs:pattern value="[&#x|&#x23-&#x5B|&#5D-&#x7E]*"/>
51 </xs:restriction>
52 </xs:simpleType>
53 -->
54
55 <!--
56 Authenticate: consider "redirect" as well as typical connection info like:
57 grant_type - use the value “password”
58 client_id - your API client id
59 client_secret - the secret key of your client
60 username - the account username for which you want to obtain an access token
61 password - the account password
62 response_type - use the value “token”
63
64 -->
65 <!-- RFC 6749, Section 4.2.1 -->
66 <xs:element name="tokenRequest">
67 <xs:complexType>
68 <xs:sequence>
69 <!-- Must be set to "token" -->
70 <xs:element name="response_type" type="xs:string" minOccurs="1" maxOccurs="1"/>
71 <xs:element name="client_id" type="xs:string" minOccurs="1" maxOccurs="1"/>
72 <xs:element name="redirect_uri" type="xs:string" minOccurs="0" maxOccurs="1"/>
73 <!-- only include for "refresh_token" type -->
74 <xs:element name="refresh_token" type="xs:string" minOccurs="0" maxOccurs="1"/>
75 <xs:element name="state" type="xs:string" minOccurs="0" maxOccurs="1"/>
76 <xs:element name="scope" type="xs:string" minOccurs="0" maxOccurs="1"/>
77 <!-- Normally put in application/x-www-form-urlencoded -->
78 <xs:element name="grant_type" type="xs:string" minOccurs="0" maxOccurs="1"/>
79 <xs:element name="username" type="xs:string" minOccurs="0" maxOccurs="1"/>
80 <xs:element name="password" type="xs:string" minOccurs="0" maxOccurs="1"/>
81 <xs:element name="client_secret" type="xs:string" minOccurs="0" maxOccurs="1"/>
82 </xs:sequence>
83 </xs:complexType>
84 </xs:element>
85
86 <!-- RFC 6749, Section 4.2.2 -->
87 <xs:element name="token">
88 <xs:complexType>
89 <xs:sequence>
90 <xs:element name="access_token" type="xs:string" minOccurs="1" maxOccurs="1"/>
91 <xs:element name="token_type" type="xs:string" minOccurs="1" maxOccurs="1"/>
92 <xs:element name="refresh_token" type="xs:string" minOccurs="0" maxOccurs="1"/>
93 <xs:element name="expires_in" type="xs:int" minOccurs="0" maxOccurs="1"/>
94 <xs:element name="scope" type="xs:string" minOccurs="0" maxOccurs="1"/>
95 <xs:element name="state" type="xs:string" minOccurs="0" maxOccurs="1"/>
96 </xs:sequence>
97 </xs:complexType>
98 </xs:element>
99
100 <!-- RFC 6749, Section 4.2.2.1 -->
101 <xs:element name="error">
102 <xs:complexType>
103 <xs:sequence>
104 <xs:element name="error">
105 <xs:simpleType>
106 <xs:restriction base="xs:string">
107 <xs:enumeration value="invalid_request" />
108 <xs:enumeration value="unauthorized_client" />
109 <xs:enumeration value="access_denied" />
110 <xs:enumeration value="unsupported_response_type" />
111 <xs:enumeration value="invalid_scope" />
112 <xs:enumeration value="server_error" />
113 <xs:enumeration value="temporarily_unavailable" />
114 </xs:restriction>
115 </xs:simpleType>
116 </xs:element>
117 <xs:element name="error_description" type="xs:string" minOccurs="0" maxOccurs="1" />
118 <xs:element name="error_uri" type="xs:string" minOccurs="0" maxOccurs="1" />
119 <xs:element name="state" type="xs:string" minOccurs = "0" maxOccurs="1" />
120 </xs:sequence>
121 </xs:complexType>
122 </xs:element>
123
124 <!-- Jonathan 4/21/2016 New for Certificate Info -->
125 <xs:element name="introspect">
126 <xs:complexType>
127 <xs:sequence>
128 <xs:element name="access_token" type="xs:string" minOccurs="0" maxOccurs="1"/>
129 <xs:element name="active" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
130 <xs:element name="client_id" type="xs:string" minOccurs="0" maxOccurs="1"/>
131 <xs:element name="username" type="xs:string" minOccurs="0" maxOccurs="1"/>
132 <xs:element name="client_type" type="xs:string" minOccurs="1" maxOccurs="1"/>
133 <!-- Seconds from jan 1 1970 -->
134 <xs:element name="exp" type="xs:long" minOccurs="0" maxOccurs="1"/>
135 <xs:element name="scope" type="xs:string" minOccurs="1" maxOccurs="1"/>
136 <xs:element name="content" type="xs:string" minOccurs="0" maxOccurs="1"/>
137 </xs:sequence>
138 </xs:complexType>
139 </xs:element>
140
141</xs:schema>