AlbaApi

<back to all web services

ValidateNemIdRequestModel

The following routes are available for this service:
GET/nemidvalidatelogin
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class ValidateNemIdRequestModel implements IConvertible
{
    ValidateNemIdRequestModel();
    ValidateNemIdRequestModel.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ValidateNemIdRequestModel";
    TypeContext? context = _ctx;
}

abstract class Body
{
    Body();
    Body.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "Body";
    TypeContext? context = _ctx;
}

abstract class FlowMessage extends Body
{
    String? timestamp;
    String? transactionIdentifier;

    FlowMessage({this.timestamp,this.transactionIdentifier});
    FlowMessage.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        timestamp = json['timestamp'];
        transactionIdentifier = json['transactionIdentifier'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'timestamp': timestamp,
        'transactionIdentifier': transactionIdentifier
    });

    getTypeName() => "FlowMessage";
    TypeContext? context = _ctx;
}

enum ClientFlow
{
    NemID,
    NemIDSignature,
    NemIDKeyFile,
    NemIDKeyFileSignature,
    NL3Signature,
    Invalid,
    LoadTest,
}

enum FlowStatus
{
    Ok,
    UserCancel,
    ClientFlowError,
    FlowError,
    ValidationError,
}

class FlowResult extends FlowMessage implements IConvertible
{
    ClientFlow? clientFlow;
    FlowStatus? status;
    bool? isSuccess;
    String? message;
    String? userMessage;
    String? flowErrorCode;

    FlowResult({this.clientFlow,this.status,this.isSuccess,this.message,this.userMessage,this.flowErrorCode});
    FlowResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        clientFlow = JsonConverters.fromJson(json['clientFlow'],'ClientFlow',context!);
        status = JsonConverters.fromJson(json['status'],'FlowStatus',context!);
        isSuccess = json['isSuccess'];
        message = json['message'];
        userMessage = json['userMessage'];
        flowErrorCode = json['flowErrorCode'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'clientFlow': JsonConverters.toJson(clientFlow,'ClientFlow',context!),
        'status': JsonConverters.toJson(status,'FlowStatus',context!),
        'isSuccess': isSuccess,
        'message': message,
        'userMessage': userMessage,
        'flowErrorCode': flowErrorCode
    });

    getTypeName() => "FlowResult";
    TypeContext? context = _ctx;
}

enum CertificateType
{
    Poces,
    Moces,
    Voces,
    Foces,
}

class SignProperty implements IConvertible
{
    String? name;
    String? value;

    SignProperty({this.name,this.value});
    SignProperty.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        value = json['value'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'value': value
    };

    getTypeName() => "SignProperty";
    TypeContext? context = _ctx;
}

enum LogonType
{
    Otp,
    KeyFile,
    Unknown,
}

class AuthenticationInfo implements IConvertible
{
    String? pid;
    String? dn;
    String? commonName;
    String? rid;
    String? cpr;
    String? cvr;
    String? company;
    String? email;
    String? signedXml;
    String? issuerDn;
    bool? isYouthCert;
    CertificateType? certificateType;
    String? subjectSerialNumber;
    List<SignProperty>? signProperties;
    String? rememberUserIdToken;
    LogonType? logonType;
    String? certificateSerialNumber;
    Uint8List? clientCertificate;
    String? authorizedToRepresent;

    AuthenticationInfo({this.pid,this.dn,this.commonName,this.rid,this.cpr,this.cvr,this.company,this.email,this.signedXml,this.issuerDn,this.isYouthCert,this.certificateType,this.subjectSerialNumber,this.signProperties,this.rememberUserIdToken,this.logonType,this.certificateSerialNumber,this.clientCertificate,this.authorizedToRepresent});
    AuthenticationInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        pid = json['pid'];
        dn = json['dn'];
        commonName = json['commonName'];
        rid = json['rid'];
        cpr = json['cpr'];
        cvr = json['cvr'];
        company = json['company'];
        email = json['email'];
        signedXml = json['signedXml'];
        issuerDn = json['issuerDn'];
        isYouthCert = json['isYouthCert'];
        certificateType = JsonConverters.fromJson(json['certificateType'],'CertificateType',context!);
        subjectSerialNumber = json['subjectSerialNumber'];
        signProperties = JsonConverters.fromJson(json['signProperties'],'List<SignProperty>',context!);
        rememberUserIdToken = json['rememberUserIdToken'];
        logonType = JsonConverters.fromJson(json['logonType'],'LogonType',context!);
        certificateSerialNumber = json['certificateSerialNumber'];
        clientCertificate = JsonConverters.fromJson(json['clientCertificate'],'Uint8List',context!);
        authorizedToRepresent = json['authorizedToRepresent'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'pid': pid,
        'dn': dn,
        'commonName': commonName,
        'rid': rid,
        'cpr': cpr,
        'cvr': cvr,
        'company': company,
        'email': email,
        'signedXml': signedXml,
        'issuerDn': issuerDn,
        'isYouthCert': isYouthCert,
        'certificateType': JsonConverters.toJson(certificateType,'CertificateType',context!),
        'subjectSerialNumber': subjectSerialNumber,
        'signProperties': JsonConverters.toJson(signProperties,'List<SignProperty>',context!),
        'rememberUserIdToken': rememberUserIdToken,
        'logonType': JsonConverters.toJson(logonType,'LogonType',context!),
        'certificateSerialNumber': certificateSerialNumber,
        'clientCertificate': JsonConverters.toJson(clientCertificate,'Uint8List',context!),
        'authorizedToRepresent': authorizedToRepresent
    };

    getTypeName() => "AuthenticationInfo";
    TypeContext? context = _ctx;
}

class NemIDFlowResult extends FlowResult implements IConvertible
{
    AuthenticationInfo? authenticationInfo;

    NemIDFlowResult({this.authenticationInfo});
    NemIDFlowResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        authenticationInfo = JsonConverters.fromJson(json['authenticationInfo'],'AuthenticationInfo',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'authenticationInfo': JsonConverters.toJson(authenticationInfo,'AuthenticationInfo',context!)
    });

    getTypeName() => "NemIDFlowResult";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'hcbtas_q_albamfs_api.azurewebsites.net', types: <String, TypeInfo> {
    'ValidateNemIdRequestModel': TypeInfo(TypeOf.Class, create:() => ValidateNemIdRequestModel()),
    'Body': TypeInfo(TypeOf.AbstractClass),
    'FlowMessage': TypeInfo(TypeOf.AbstractClass),
    'ClientFlow': TypeInfo(TypeOf.Enum, enumValues:ClientFlow.values),
    'FlowStatus': TypeInfo(TypeOf.Enum, enumValues:FlowStatus.values),
    'FlowResult': TypeInfo(TypeOf.Class, create:() => FlowResult()),
    'CertificateType': TypeInfo(TypeOf.Enum, enumValues:CertificateType.values),
    'SignProperty': TypeInfo(TypeOf.Class, create:() => SignProperty()),
    'LogonType': TypeInfo(TypeOf.Enum, enumValues:LogonType.values),
    'AuthenticationInfo': TypeInfo(TypeOf.Class, create:() => AuthenticationInfo()),
    'List<SignProperty>': TypeInfo(TypeOf.Class, create:() => <SignProperty>[]),
    'Uint8List': TypeInfo(TypeOf.Class, create:() => Uint8List(0)),
    'NemIDFlowResult': TypeInfo(TypeOf.Class, create:() => NemIDFlowResult()),
});

Dart 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>