AlbaApi

<back to all web services

ValidateNemIdRequestModel

The following routes are available for this service:
GET/nemidvalidatelogin
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ValidateNemIdRequestModel:
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Body:
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FlowMessage(Body):
    timestamp: Optional[str] = None
    transaction_identifier: Optional[str] = None


class ClientFlow(str, Enum):
    NEM_I_D = 'NemID'
    NEM_I_D_SIGNATURE = 'NemIDSignature'
    NEM_I_D_KEY_FILE = 'NemIDKeyFile'
    NEM_I_D_KEY_FILE_SIGNATURE = 'NemIDKeyFileSignature'
    N_L3_SIGNATURE = 'NL3Signature'
    INVALID = 'Invalid'
    LOAD_TEST = 'LoadTest'


class FlowStatus(str, Enum):
    OK = 'Ok'
    USER_CANCEL = 'UserCancel'
    CLIENT_FLOW_ERROR = 'ClientFlowError'
    FLOW_ERROR = 'FlowError'
    VALIDATION_ERROR = 'ValidationError'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FlowResult(FlowMessage):
    client_flow: Optional[ClientFlow] = None
    status: Optional[FlowStatus] = None
    is_success: Optional[bool] = None
    message: Optional[str] = None
    user_message: Optional[str] = None
    flow_error_code: Optional[str] = None


class CertificateType(str, Enum):
    POCES = 'Poces'
    MOCES = 'Moces'
    VOCES = 'Voces'
    FOCES = 'Foces'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SignProperty:
    name: Optional[str] = None
    value: Optional[str] = None


class LogonType(str, Enum):
    OTP = 'Otp'
    KEY_FILE = 'KeyFile'
    UNKNOWN = 'Unknown'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AuthenticationInfo:
    pid: Optional[str] = None
    dn: Optional[str] = None
    common_name: Optional[str] = None
    rid: Optional[str] = None
    cpr: Optional[str] = None
    cvr: Optional[str] = None
    company: Optional[str] = None
    email: Optional[str] = None
    signed_xml: Optional[str] = None
    issuer_dn: Optional[str] = None
    is_youth_cert: Optional[bool] = None
    certificate_type: Optional[CertificateType] = None
    subject_serial_number: Optional[str] = None
    sign_properties: Optional[IList[SignProperty]] = None
    remember_user_id_token: Optional[str] = None
    logon_type: Optional[LogonType] = None
    certificate_serial_number: Optional[str] = None
    client_certificate: Optional[bytes] = None
    authorized_to_represent: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class NemIDFlowResult(FlowResult):
    authentication_info: Optional[AuthenticationInfo] = None

Python ValidateNemIdRequestModel DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /nemidvalidatelogin HTTP/1.1 
Host: hcbtas-q-albamfs-api.azurewebsites.net 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<NemIDFlowResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SPS.Core.Api.Frame.NemID">
  <Timestamp xmlns="http://schemas.datacontract.org/2004/07/SPS.Core.Api.Frame">String</Timestamp>
  <TransactionIdentifier xmlns="http://schemas.datacontract.org/2004/07/SPS.Core.Api.Frame">String</TransactionIdentifier>
  <ClientFlow xmlns="http://schemas.datacontract.org/2004/07/SPS.Core.Api.Frame">NemID</ClientFlow>
  <FlowErrorCode xmlns="http://schemas.datacontract.org/2004/07/SPS.Core.Api.Frame">String</FlowErrorCode>
  <Message xmlns="http://schemas.datacontract.org/2004/07/SPS.Core.Api.Frame">String</Message>
  <Status xmlns="http://schemas.datacontract.org/2004/07/SPS.Core.Api.Frame">Ok</Status>
  <UserMessage xmlns="http://schemas.datacontract.org/2004/07/SPS.Core.Api.Frame">String</UserMessage>
  <AuthenticationInfo>
    <AuthorizedToRepresent>String</AuthorizedToRepresent>
    <CertificateSerialNumber>String</CertificateSerialNumber>
    <CertificateType>Poces</CertificateType>
    <ClientCertificate>AA==</ClientCertificate>
    <CommonName>String</CommonName>
    <Company>String</Company>
    <Cpr>String</Cpr>
    <Cvr>String</Cvr>
    <Dn>String</Dn>
    <Email>String</Email>
    <IsYouthCert>false</IsYouthCert>
    <IssuerDn>String</IssuerDn>
    <LogonType>Otp</LogonType>
    <Pid>String</Pid>
    <RememberUserIdToken>String</RememberUserIdToken>
    <Rid>String</Rid>
    <SignProperties i:nil="true" />
    <SignedXml>String</SignedXml>
    <SubjectSerialNumber>String</SubjectSerialNumber>
  </AuthenticationInfo>
</NemIDFlowResult>