<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://xml.netbeans.org/schema/Authen_Autho"
            xmlns:tns="http://xml.netbeans.org/schema/Authen_Autho"
            elementFormDefault="qualified">
    <xsd:element name="UC-request" type="tns:uc-request"/>
    <xsd:element name="UC-response" type="tns:uc-response"/>
    <xsd:complexType name="uc-request">
        <xsd:sequence>
            <!-- username, password and lastLogin are used in Authentication-->
            <xsd:element name="username" type="xsd:string" minOccurs="0"/>
            <xsd:element name="password" type="xsd:string" minOccurs="0"/>
            <xsd:element name="lastLogin" type="xsd:date" minOccurs="0"/>
            <!-- signature is used in Authorisation-->
            <xsd:element name="signature" type="xsd:string" minOccurs="0"/>
            <xsd:element name="action" type="xsd:string"/>
            <xsd:element name="operation" type="xsd:string" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="uc-response">
        <xsd:sequence>
            <xsd:element name="return" type="xsd:boolean"/>
            <xsd:element name="returnMessage" type="xsd:string"/>
            <xsd:element name="role" minOccurs="0" maxOccurs="1">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="ucrole" type="xsd:string" maxOccurs="unbounded"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="username" type="xsd:string" minOccurs="0"/>
            <xsd:element name="language" type="xsd:string" minOccurs="0"/>
            <xsd:element name="lastLogin" type="xsd:date" minOccurs="0"/>
            <xsd:element name="orgName" type="xsd:string" minOccurs="0"/>
            <xsd:element name="unreadMessages" type="xsd:int" minOccurs="0"/>
            <xsd:element name="hasAccess" type="xsd:boolean" minOccurs="0"/>
            <xsd:element name="userAccountID" type="xsd:int" minOccurs="0"/>
            <xsd:element name="signature" type="xsd:string" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>
