<?xml version="1.0" encoding="UTF-8"?>
<saml2:Assertion ID="_2cb63f7d-2040-4302-8747-285288dc438c" IssueInstant="2014-06-20T09:56:57.297Z" Version="2.0" 
    xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <saml2:Issuer Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">
        ElgaBereichsHomeCommunityID</saml2:Issuer>
    <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
        <ds:SignedInfo>
            <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
            <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
            <ds:Reference URI="#_2cb63f7d-2040-4302-8747-285288dc438c">
                <ds:Transforms>
                    <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
                    <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                        <ec:InclusiveNamespaces PrefixList="xs" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                    </ds:Transform>
                </ds:Transforms>
                <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256"/>
                <ds:DigestValue>VS498VgQN5/u5lM7xX6YNCY2dTc=</ds:DigestValue>
            </ds:Reference>
        </ds:SignedInfo>
        <ds:SignatureValue>
            fDb6nk1h4bHX3g5Ajk+A/RsXy3XuAc6dPKp373OtUoX7hpdU7SKUMWvGUT7koM4v0InL0xg/ffe6p6r
            7/iRYi2FMgrCmjdseoHefMNLiPwlE+5GQyYMQNCWBrEg/2UyeG5IxmWv5ujSee+xEmKcRXlFhw0wu7sB2tJslq/bF3XWyL
            mnGG8acR0G+tFf7eeNd6zxS4lxTsrJRtAq/Y79obQShxtAaLmVjDTbLMima2Guczzk1SFcyIPKcwUcTEDN5xexKhasBAsv
            VB9EXlchDHxWAyV0l2+DKQmXy9HyOy2eACiHmyOyA+/BOc68btxeNTcAPOiC8I0sxA==</ds:SignatureValue>
        <ds:KeyInfo>
            <ds:X509Data>
                <ds:X509Certificate>
                    MIIEQTCCAymgAwIBAgIBAzANBgkqhkiG9w0BAQUFADCBrDELMAkGA1UEBhMCQVQxEDAOBgNVBAgT 
                    B0F1c3RyaWExDzANBgNVBAcTBlZpZW5uYTEaMBgGA1UEChMRVGlhbmkgU3Bpcml0IEdtYkgxGTAX
                    BgNVBAsTEERlbW8gRW52aXJvbm1lbnQxEDAOBgNVBAMTB1Rlc3QgQ0ExMTAvBgkqhkiG9w0BCQEW 
                    Im1hc3NpbWlsaWFuby5tYXNpQHRpYW5pLXNwaXJpdC5jb20wIBcNMTEwNzI3MDgyMTUyWhgPMjE5
                    rmkObvyykzyPz5wddLmouqrZZqfufPTNh4whyABbXCPXsptDZZss8DlKS37rFVUKLHEhcfd1J+IO 
                    ioaTnaPhgY/dXg==</ds:X509Certificate>
            </ds:X509Data>
        </ds:KeyInfo>
    </ds:Signature>
    <saml2:Subject>
        <saml2:NameID Format="urn:oasis:names:tc:SAML:2.0:unspecified">
            ElgaBereichsHomeCommunityID</saml2:NameID>
        <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:sender-vouches">
            <saml2:SubjectConfirmationData/>
        </saml2:SubjectConfirmation>
    </saml2:Subject>
    <saml2:Conditions NotBefore="2014-06-20T09:56:56.681Z" NotOnOrAfter="2014-06-20T10:01:56.681Z">
        <saml2:AudienceRestriction>
            <saml2:Audience>https://ElgaBereich/desination/endpoint</saml2:Audience>
        </saml2:AudienceRestriction>
    </saml2:Conditions>
    <saml2:AuthnStatement AuthnInstant="2014-06-20T09:56:56.681Z">
        <saml2:AuthnContext>
            <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PreviousSession</saml2:AuthnContextClassRef>
        </saml2:AuthnContext>
    </saml2:AuthnStatement>
    <saml2:AttributeStatement>
        <saml2:Attribute FriendlyName="XSPA Subject" Name="urn:oasis:names:tc:xacml:1.0:subject:subject-id" 
            NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">
                XSPA Subject of the input assertion</saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute FriendlyName="XSPA Organization ID" Name="urn:oasis:names:tc:xspa:1.0:subject:organization-id" 
            NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:anyURI">
                XSPA Organization ID of the input assertion if available</saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute FriendlyName="Purpose Of Use" Name="urn:oasis:names:tc:xspa:1.0:subject:purposeofuse" 
            NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">LOCAL_REQUEST
            </saml2:AttributeValue>
        </saml2:Attribute>
        <saml2:Attribute FriendlyName="ELGA Rolle" Name="urn:oasis:names:tc:xacml:2.0:subject:role" 
            NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:anyType">
                <Role code="700" codeSystem="1.2.40.0.34.5.3" codeSystemName="ELGA Rollen" displayName="Arzt" 
                    xmlns="urn:hl7-org:v3"/>
            </saml2:AttributeValue>
        </saml2:Attribute>
        
        <!-- the bPK-GH of the patient - will only be available for eMed PHARM and ITI-XX transactions -->
        <saml2:Attribute FriendlyName="Area specific person identifier GH" Name="urn:elga:bes:2013:bPK-GH" 
            NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xsi:type="xs:anyURI">GH:BPKLVLJUTSBVIYEV9+NIOC2QCI2EMQ=^^^&amp;1.2.40.0.10.2.1.1.149&amp;ISO
            </saml2:AttributeValue>
        </saml2:Attribute>
        
        <!-- the last re OPT-IN date of the patient - will only be available for eMed PHARM and ITI-XX transactions -->
        <saml2:Attribute FriendlyName="Last re OPT-IN date time of the patient" Name="urn:elga:bes:2013:reOptInDate" 
            NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
            <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xsi:type="xs:dateTime">2014-08-26T10:57:29.005Z
            </saml2:AttributeValue>
        </saml2:Attribute>
    </saml2:AttributeStatement>
</saml2:Assertion>
