| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
| |
| Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. |
| |
| The contents of this file are subject to the terms of either the GNU |
| General Public License Version 2 only ("GPL") or the Common |
| Development and Distribution License("CDDL") (collectively, the |
| "License"). You may not use this file except in compliance with the |
| License. You can obtain a copy of the License at |
| https://netbeans.org/cddl-gplv2.html |
| or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the |
| specific language governing permissions and limitations under the |
| License. When distributing the software, include this License Header |
| Notice in each file and include the License file at |
| nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this |
| particular file as subject to the "Classpath" exception as provided |
| by Sun in the GPL Version 2 section of the License file that |
| accompanied this code. If applicable, add the following below the |
| License Header, with the fields enclosed by brackets [] replaced by |
| your own identifying information: |
| "Portions Copyrighted [year] [name of copyright owner]" |
| |
| Contributor(s): |
| |
| The Original Software is NetBeans. The Initial Developer of the Original |
| Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun |
| Microsystems, Inc. All Rights Reserved. |
| |
| If you wish your version of this file to be governed by only the CDDL |
| or only the GPL Version 2, indicate your decision by adding |
| "[Contributor] elects to include this software in this distribution |
| under the [CDDL or GPL Version 2] license." If you do not indicate a |
| single choice of license, a recipient has the option to distribute |
| your version of this file under either the CDDL, the GPL Version 2 or |
| to extend the choice of license to its licensees as provided above. |
| However, if you add GPL Version 2 code and therefore, elected the GPL |
| Version 2 license, then the option applies only if the new code is |
| made subject to such option by the copyright holder. |
| --> |
| |
| <xsd:schema |
| targetNamespace="https://netbeans.org/ns/oauth/metadata/1" |
| xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
| xmlns:oauth="https://netbeans.org/ns/oauth/metadata/1" |
| elementFormDefault="qualified"> |
| |
| <xsd:element name="metadata" type="oauth:metadata"/> |
| |
| <xsd:complexType name="metadata"> |
| <xsd:annotation> |
| <xsd:documentation> |
| root element: specifies OAuth authentication flow and OAuth parameters; |
| </xsd:documentation> |
| </xsd:annotation> |
| <xsd:sequence> |
| <xsd:element name="flow" type="oauth:flowType"/> |
| <xsd:element name="param" type="oauth:paramType" minOccurs="0" maxOccurs="unbounded"/> |
| </xsd:sequence> |
| <xsd:attribute name="base-url" type="xsd:anyURI" use="required"/> |
| <xsd:attribute name="signature-method" type="oauth:signature-methodType" use="required"/> |
| <xsd:attribute name="version" type="xsd:string"/> <!-- default: 1.0 --> |
| <xsd:attribute name="nonce" type="xsd:boolean"/> <!-- default: true --> |
| <xsd:attribute name="timestamp" type="xsd:boolean"/> <!-- default: true --> |
| </xsd:complexType> |
| |
| <xsd:complexType name="flowType"> |
| <xsd:annotation> |
| <xsd:documentation> |
| specifies 3 phases of OAuth authentication mechanism: |
| 1. obtaining request-token, |
| 2. consumer authorization and getting access-token |
| 3. obtaining access-token |
| </xsd:documentation> |
| </xsd:annotation> |
| <xsd:sequence> |
| <xsd:element name="request-token" type="oauth:methodType" /> |
| <xsd:element name="authorization" type="oauth:authorizationType" /> |
| <xsd:element name="access-token" type="oauth:methodType"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <xsd:complexType name="methodType"> |
| <xsd:annotation> |
| <xsd:documentation> |
| specifies REST method used to obtain (request/access) token. |
| </xsd:documentation> |
| </xsd:annotation> |
| <xsd:attribute name="method-name" type="xsd:string" use="required"/> |
| <xsd:attribute name="request-style" use="required"> |
| <xsd:simpleType> |
| <xsd:restriction base="xsd:string"> |
| <xsd:enumeration value="FORM"/> |
| <xsd:enumeration value="PATH"/> |
| <xsd:enumeration value="QUERY"/> |
| <xsd:enumeration value="HEADER"/> |
| </xsd:restriction> |
| </xsd:simpleType> |
| </xsd:attribute> |
| <!-- request parameter. Default: "method" --> |
| <xsd:attribute name="request-param" type="xsd:string"/> |
| <xsd:attribute name="response-style" use="required"> |
| <xsd:simpleType> |
| <xsd:restriction base="xsd:string"> |
| <xsd:enumeration value="FORM"/> |
| <xsd:enumeration value="XML"/> |
| <xsd:enumeration value="JSON"/> |
| </xsd:restriction> |
| </xsd:simpleType> |
| </xsd:attribute> |
| <xsd:attribute name="signature-method" type="oauth:signature-methodType"/> |
| <xsd:attribute name="version" type="xsd:string"/> <!-- default: 1.0 --> |
| <xsd:attribute name="nonce" type="xsd:boolean"/> <!-- default: true --> |
| <xsd:attribute name="timestamp" type="xsd:boolean"/> <!-- default: true --> |
| <xsd:attribute name="callback" type="xsd:boolean"/> <!-- default: false --> |
| <xsd:attribute name="verifier" type="xsd:boolean"/> <!-- default: false --> |
| </xsd:complexType> |
| |
| <xsd:complexType name="authorizationType"> |
| <xsd:annotation> |
| <xsd:documentation> |
| specifies authorization step, that can be either |
| 1. fixed-url URL with one ore more OAuth parameters |
| 2. dynamic-url obtained during first step (request-token) |
| </xsd:documentation> |
| </xsd:annotation> |
| <xsd:sequence> |
| <xsd:choice> |
| <xsd:element name="fixed-url" type="oauth:fixed-urlType"/> |
| <xsd:element name="dynamic-url" type="oauth:dynamic-urlType"/> |
| </xsd:choice> |
| <xsd:element name="param" type="oauth:paramType" minOccurs="0" maxOccurs="unbounded"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <xsd:complexType name="dynamic-urlType"> |
| <xsd:annotation> |
| <xsd:documentation> |
| specifies dynamic-url of authorization page, |
| obtained during request-token step - as auth-param-name |
| </xsd:documentation> |
| </xsd:annotation> |
| <xsd:attribute name="auth-param-name" type="xsd:string" use="required"/> |
| </xsd:complexType> |
| |
| <xsd:complexType name="fixed-urlType"> |
| <xsd:annotation> |
| <xsd:documentation> |
| specifies fixed-url of authorization page |
| </xsd:documentation> |
| </xsd:annotation> |
| <xsd:attribute name="url" type="xsd:anyURI" use="required"/> |
| </xsd:complexType> |
| |
| <xsd:simpleType name="signature-methodType"> |
| <xsd:annotation> |
| <xsd:documentation> |
| signature method |
| </xsd:documentation> |
| </xsd:annotation> |
| <xsd:restriction base="xsd:string"> |
| <xsd:enumeration value="HMAC_SHA1"/> |
| <xsd:enumeration value="PLAINTEXT"/> |
| </xsd:restriction> |
| </xsd:simpleType> |
| |
| <xsd:complexType name="paramType"> |
| <xsd:attribute name="oauth-name" type="xsd:string" use="required"/> |
| <xsd:attribute name="param-name" type="xsd:string"/> |
| <xsd:attribute name="oauth-prefix" type="xsd:string"/> |
| <xsd:attribute name="oauth-postfix" type="xsd:string"/> |
| <xsd:attribute name="xpath" type="xsd:string"/> |
| </xsd:complexType> |
| |
| </xsd:schema> |
| |