Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Identity Attributes and SAML Assertion

Identity Attributes

Upon successful authentication, the following elements are transmitted in the assertion as an AttributeStatement:

NameAttributeDescription
HIN LoginX-HIN-LOGIN-NAMEUnique key within the HIN Platform
AGW LoginX-HIN-AGW-LOGIN-NAMEIdentifier of the institutional Access Gateway (device ID)
NameX-HIN-COMMON-NAMEFirst name & last name “Carl Muster” (without middle name)
First NameX-HIN-GIVEN-NAME“Carl”
Middle NameX-HIN-MIDDLE-NAME“Max”
Last NameX-HIN-SURNAME“Muster”
User TypeX-HIN-USERTYPEType of user. Possible values: <empty>, Personal, Team, Device
StreetX-HIN-ADDRESS-1
Address Line 2X-HIN-ADDRESS-2
Postal CodeX-HIN-POSTAL-CODE
CityX-HIN-LOCATION
CountryX-HIN-COUNTRYE.g. “CH”
E-MailX-HIN-MAILHIN mail address for receiving encrypted messages
GLN No. DoctorX-HIN-EAN-NO-MEDICAL
FMH No. DoctorX-HIN-FMH-NO-MEDICAL
GLN No. PracticeX-HIN-EAN-NO-OFFICE
ZSR No. PracticeX-HIN-ZSR-NO-OFFICE
Institution CodeX-HIN-INSTITUTION-CODE
Organisation TypeX-HIN-ORGANISATION-TYPE / X-HIN-ORGANIZATION-TYPEBoth spellings for historical reasons. Numeric value: 0 = No company, 1 = Company (general), 10 = Doctor’s practice, 11 = Spitex organisation, 12 = Physiotherapy practice, 13 = Occupational therapy practice, 14 = Nutritional counselling practice, 15 = Psychological practice, 16 = Dental practice
OrganisationX-HIN-ORGANIZATION-IDOrganisation ID of the user within HIN (e.g. M123456)
OrganisationX-HIN-ORGANIZATIONName of the user’s organisation
ASAS IDX-HIN-ASAS-UserIdFormer identifier (replaced by HIN Login)
Hardening LevelX-HIN-HARDENCODEBASIC, PLUS, EPDG
Person CodeX-HIN-PERSON-CODENumeric value: -1 = Device, 0 = No person, 1 = Person (general), 10 = Doctor, 11 = Nurse, 12 = Physiotherapist, 13 = Occupational therapist, 14 = Nutritionist, 15 = Psychotherapist, 16 = Dentist, 17 = Pharmacist, 18 = Chiropractor, 19 = Midwife, 20 = Complementary medicine practitioner, 21 = Social worker, 22 = Speech therapist, 23 = Breastfeeding consultant, 24 = Other healthcare professional
LanguageX-HIN-LANGUAGEE.g. “DE”
Test CodeX-HIN-TEST-CODE0 = Production ID, 1 = Test ID
Authentication MethodX-HIN-AUTH-METHOD
Serial NumberX-HIN-SERIAL_NUMBER
TitleX-HIN-TITEL
Academic TitleX-HIN-ACADEMICTITLE

Important: Checking X-HIN-TEST-CODE is mandatory for production applications to prevent test IDs from being granted access.

SAML Assertion Example

<saml:Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" ID="ID_f5e713c6-7677-4241-b8c7-13541f4873a6"
        IssueInstant="2026-06-23T15:02:23.169Z" Version="2.0">
        <saml:Issuer>https://broker.hin.ch/realms/HINBroker</saml:Issuer>
        <dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
            <dsig:SignedInfo>
                <dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
                <dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
                <dsig:Reference URI="#ID_f5e713c6-7677-4241-b8c7-13541f4873a6">
                    <dsig:Transforms>
                        <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
                        <dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
                    </dsig:Transforms>
                    <dsig:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
                    <dsig:DigestValue>svxI9BStHonHW/kPkPe3VgyuQ40RivynWxV3BEsAbtk=</dsig:DigestValue>
                </dsig:Reference>
            </dsig:SignedInfo>
            <dsig:SignatureValue>
                aC...bws=
            </dsig:SignatureValue>
            <dsig:KeyInfo>
                <dsig:X509Data>
                    <dsig:X509Certificate>
                        MII...Zs0=
                    </dsig:X509Certificate>
                </dsig:X509Data>
            </dsig:KeyInfo>
        </dsig:Signature>
        <saml:Subject>
            <saml:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">60590</saml:NameID>
            <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
                <saml:SubjectConfirmationData InResponseTo="hin-checker-ee1b8e5f-299c-4fa1-b7fb-279817cce388"
                    NotOnOrAfter="2026-06-23T15:07:21.169Z" Recipient="https://example.com/" />
            </saml:SubjectConfirmation>
        </saml:Subject>
        <saml:Conditions NotBefore="2026-06-23T15:02:21.169Z" NotOnOrAfter="2026-06-23T15:03:21.169Z">
            <saml:AudienceRestriction>
                <saml:Audience>https://example.com/</saml:Audience>
            </saml:AudienceRestriction>
        </saml:Conditions>
        <saml:AuthnStatement AuthnInstant="2026-06-23T15:02:23.170Z"
            SessionIndex="DR59Sh7-HcmV-BcykcSMIT3Q::1a04a300-e512-4d31-a183-b893fefd97a3"
            SessionNotOnOrAfter="2026-06-24T03:12:23.170Z">
            <saml:AuthnContext>
                <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified
                </saml:AuthnContextClassRef>
            </saml:AuthnContext>
        </saml:AuthnStatement>
        <saml:AttributeStatement>
            <saml:Attribute FriendlyName="X-HIN-POSTAL-CODE" Name="X-HIN-POSTAL-CODE"
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">8304
                </saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute FriendlyName="X-HIN-LOGIN-NAME" Name="X-HIN-LOGIN-NAME"
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">montes1
                </saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute FriendlyName="X-HIN-TEST-CODE" Name="X-HIN-TEST-CODE"
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">1</saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute FriendlyName="X-HIN-HARDENCODE" Name="X-HIN-HARDENCODE"
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">PLUS
                </saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute FriendlyName="X-HIN-GIVEN-NAME" Name="X-HIN-GIVEN-NAME"
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Monitoring
                </saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute FriendlyName="X-HIN-COMMON-NAME" Name="X-HIN-COMMON-NAME"
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Monitoring Test1
                </saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute FriendlyName="X-HIN-PERSON-CODE" Name="X-HIN-PERSON-CODE"
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">1</saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute FriendlyName="X-HIN-ORGANIZATION" Name="X-HIN-ORGANIZATION"
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Health Info Net AG
                </saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute FriendlyName="X-HIN-SURNAME" Name="X-HIN-SURNAME"
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Test1
                </saml:AttributeValue>
            </saml:Attribute>
            <saml:Attribute FriendlyName="X-HIN-MAIL" Name="X-HIN-MAIL"
                NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                <saml:AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">
                    test-monitoring-test1@hin.ch</saml:AttributeValue>
            </saml:Attribute>
        </saml:AttributeStatement>
    </saml:Assertion>