/// <summary></summary> /// <param name="endUserIp"> /// The user IP address as seen by RP. IPv4 and IPv6 is allowed. /// Note the importance of using the correct IP address.It must be the IP address representing the user agent (the end user device) as seen by the RP. /// If there is a proxy for inbound traffic, special considerations may need to be taken to get the correct address. /// /// In some use cases the IP address is not available, for instance for voice based services. /// In this case, the internal representation of those systems IP address is ok to use. /// </param> /// <param name="personalIdentityNumber"> /// The personal number of the user. 12 digits, century must be included (YYYYMMDDSSSC). /// If the personal number is excluded, the client must be started with the AutoStartToken returned in the response. /// </param> /// <param name="requirement">Requirements on how the auth or sign order must be performed.</param> public AuthRequest(string endUserIp, string?personalIdentityNumber, Requirement requirement) : this(endUserIp, personalIdentityNumber, requirement, null, null, null) { }
/// <summary></summary> /// <param name="endUserIp"> /// The user IP address as seen by RP. IPv4 and IPv6 is allowed. /// Note the importance of using the correct IP address.It must be the IP address representing the user agent (the end user device) as seen by the RP. /// If there is a proxy for inbound traffic, special considerations may need to be taken to get the correct address. /// /// In some use cases the IP address is not available, for instance for voice based services. /// In this case, the internal representation of those systems IP address is ok to use. /// </param> /// <param name="userVisibleData"> /// The text to be displayed and signed. The text can be formatted using CR, LF and CRLF for new lines. /// </param> /// <param name="userNonVisibleData"> /// Data not displayed to the user. /// </param> /// <param name="personalIdentityNumber"> /// The personal number of the user. 12 digits, century must be included (YYYYMMDDSSSC). /// If the personal number is excluded, the client must be started with the AutoStartToken returned in the response. /// </param> /// <param name="requirement">Requirements on how the auth or sign order must be performed.</param> public SignRequest(string endUserIp, string userVisibleData, byte[] userNonVisibleData, string personalIdentityNumber, Requirement requirement) { EndUserIp = endUserIp; UserVisibleData = ToBase64EncodedString(userVisibleData); PersonalIdentityNumber = personalIdentityNumber; UserNonVisibleData = ToBase64EncodedString(userNonVisibleData); Requirement = requirement ?? new Requirement(); }
/// <summary></summary> /// <param name="endUserIp"> /// The user IP address as seen by RP. IPv4 and IPv6 is allowed. /// Note the importance of using the correct IP address.It must be the IP address representing the user agent (the end user device) as seen by the RP. /// If there is a proxy for inbound traffic, special considerations may need to be taken to get the correct address. /// /// In some use cases the IP address is not available, for instance for voice based services. /// In this case, the internal representation of those systems IP address is ok to use. /// </param> /// <param name="personalIdentityNumber"> /// The personal number of the user. 12 digits, century must be included (YYYYMMDDSSSC). /// If the personal number is excluded, the client must be started with the AutoStartToken returned in the response. /// </param> /// <param name="requirement">Requirements on how the auth or sign order must be performed.</param> /// <param name="userVisibleData"> /// A text that is displayed to the user during authentication with BankID, with the /// purpose of providing context for the authentication and to enable users to notice if /// there is something wrong about the identification and avoid attempted frauds.The /// text can be formatted using CR, LF and CRLF for new lines.The text must be /// encoded as UTF-8 and then base 64 encoded. 1—1 500 characters after base 64encoding. /// </param> /// <param name="userNonVisibleData"> /// Data not displayed to the user. String. The value must be base 64-encoded. 1-1 500 characters after base 64-encoding /// </param> public AuthRequest(string endUserIp, string?personalIdentityNumber, Requirement requirement, string?userVisibleData, byte[]?userNonVisibleData) : this(endUserIp, personalIdentityNumber, requirement, userVisibleData, userNonVisibleData, null) { }
/// <summary></summary> /// <param name="endUserIp"> /// The user IP address as seen by RP. IPv4 and IPv6 is allowed. /// Note the importance of using the correct IP address.It must be the IP address representing the user agent (the end user device) as seen by the RP. /// If there is a proxy for inbound traffic, special considerations may need to be taken to get the correct address. /// /// In some use cases the IP address is not available, for instance for voice based services. /// In this case, the internal representation of those systems IP address is ok to use. /// </param> /// <param name="personalIdentityNumber"> /// The personal number of the user. 12 digits, century must be included (YYYYMMDDSSSC). /// If the personal number is excluded, the client must be started with the AutoStartToken returned in the response. /// </param> /// <param name="requirement">Requirements on how the auth or sign order must be performed.</param> public AuthRequest(string endUserIp, string?personalIdentityNumber, Requirement requirement) { EndUserIp = endUserIp; PersonalIdentityNumber = personalIdentityNumber; Requirement = requirement; }