Search Results for

    Show / Hide Table of Contents

    Class BankIdAppApiClientExtensions

    Extensions to enable easier access to common api scenarios.

    Inheritance
    System.Object
    BankIdAppApiClientExtensions
    Namespace: ActiveLogin.Authentication.BankId.Api
    Assembly: ActiveLogin.Authentication.BankId.Api.dll
    Syntax
    public static class BankIdAppApiClientExtensions : object

    Methods

    | Improve this Doc View Source

    AuthAsync(IBankIdAppApiClient, String)

    Initiates an authentication order. Use the collect method to query the status of the order.

    Declaration
    public static Task<AuthResponse> AuthAsync(this IBankIdAppApiClient appApiClient, string endUserIp)
    Parameters
    Type Name Description
    IBankIdAppApiClient appApiClient

    The IBankIdAppApiClient instance.

    System.String endUserIp

    The user IP address as seen by RP.String.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.

    Returns
    Type Description
    Task<AuthResponse>

    If the request is successful, the OrderRef and AutoStartToken is returned.

    | Improve this Doc View Source

    AuthAsync(IBankIdAppApiClient, String, Requirement, Nullable<String>, Byte[], Nullable<String>)

    Declaration
    public static Task<AuthResponse> AuthAsync(this IBankIdAppApiClient appApiClient, string endUserIp, Requirement requirement = null, string? userVisibleData = null, byte[] userNonVisibleData = null, string? userVisibleDataFormat = null)
    Parameters
    Type Name Description
    IBankIdAppApiClient appApiClient

    The IBankIdAppApiClient instance.

    System.String 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.

    Requirement requirement

    Requirements on how the auth or sign order must be performed.

    System.Nullable<System.String> userVisibleData

    The text to be displayed and signed. The text can be formatted using CR, LF and CRLF for new lines.

    System.Byte[] userNonVisibleData

    Data not displayed to the user.

    System.Nullable<System.String> userVisibleDataFormat

    If present, and set to "simpleMarkdownV1", this parameter indicates that userVisibleData holds formatting characters which, if used correctly, will make the text displayed with the user nicer to look at. For further information of formatting options, please study the document Guidelines for Formatted Text.

    Returns
    Type Description
    Task<AuthResponse>
    | Improve this Doc View Source

    CancelAsync(IBankIdAppApiClient, String)

    Cancels an ongoing sign or auth order. This is typically used if the user cancels the order in your service or app.

    Declaration
    public static Task<CancelResponse> CancelAsync(this IBankIdAppApiClient appApiClient, string orderRef)
    Parameters
    Type Name Description
    IBankIdAppApiClient appApiClient

    The IBankIdAppApiClient instance.

    System.String orderRef

    The OrderRef returned from auth or sign.

    Returns
    Type Description
    Task<CancelResponse>
    | Improve this Doc View Source

    CollectAsync(IBankIdAppApiClient, String)

    Collects the result of a sign or auth order using the OrderRef as reference. RP should keep on calling collect every two seconds as long as status indicates pending. RP must abort if status indicates failed.

    Declaration
    public static Task<CollectResponse> CollectAsync(this IBankIdAppApiClient appApiClient, string orderRef)
    Parameters
    Type Name Description
    IBankIdAppApiClient appApiClient

    The IBankIdAppApiClient instance.

    System.String orderRef

    The OrderRef returned from auth or sign.

    Returns
    Type Description
    Task<CollectResponse>

    The user identity is returned when complete.

    | Improve this Doc View Source

    PhoneAuthAsync(IBankIdAppApiClient, String, CallInitiator)

    Declaration
    public static Task<PhoneAuthResponse> PhoneAuthAsync(this IBankIdAppApiClient appApiClient, string personalIdentityNumber, CallInitiator callInitiator)
    Parameters
    Type Name Description
    IBankIdAppApiClient appApiClient

    The IBankIdAppApiClient instance.

    System.String personalIdentityNumber

    The personal number of the user. String. 12 digits.

    CallInitiator callInitiator

    Indicate if the user or the RP initiated the phone call. user: user called the RP. RP: RP called the user.

    Returns
    Type Description
    Task<PhoneAuthResponse>

    If the request is successful, the OrderRef is returned.

    | Improve this Doc View Source

    PhoneAuthAsync(IBankIdAppApiClient, String, CallInitiator, PhoneRequirement, Nullable<String>, Byte[], Nullable<String>)

    Declaration
    public static Task<PhoneAuthResponse> PhoneAuthAsync(this IBankIdAppApiClient appApiClient, string personalIdentityNumber, CallInitiator callInitiator, PhoneRequirement requirement = null, string? userVisibleData = null, byte[] userNonVisibleData = null, string? userVisibleDataFormat = null)
    Parameters
    Type Name Description
    IBankIdAppApiClient appApiClient

    The IBankIdAppApiClient instance.

    System.String personalIdentityNumber

    The personal number of the user. String. 12 digits.

    CallInitiator callInitiator

    Indicate if the user or the RP initiated the phone call. user: user called the RP. RP: RP called the user.

    PhoneRequirement requirement

    Requirements on how the phone auth or phone sign order must be performed.

    System.Nullable<System.String> userVisibleData

    The text to be displayed and signed. The text can be formatted using CR, LF and CRLF for new lines.

    System.Byte[] userNonVisibleData

    Data not displayed to the user.

    System.Nullable<System.String> userVisibleDataFormat

    If present, and set to "simpleMarkdownV1", this parameter indicates that userVisibleData holds formatting characters which, if used correctly, will make the text displayed with the user nicer to look at. For further information of formatting options, please study the document Guidelines for Formatted Text.

    Returns
    Type Description
    Task<PhoneAuthResponse>
    | Improve this Doc View Source

    PhoneSignAsync(IBankIdAppApiClient, String, CallInitiator, String)

    Declaration
    public static Task<PhoneSignResponse> PhoneSignAsync(this IBankIdAppApiClient appApiClient, string personalIdentityNumber, CallInitiator callInitiator, string userVisibleData)
    Parameters
    Type Name Description
    IBankIdAppApiClient appApiClient

    The IBankIdAppApiClient instance.

    System.String personalIdentityNumber

    The personal number of the user. String. 12 digits.

    CallInitiator callInitiator

    Indicate if the user or the RP initiated the phone call. user: user called the RP. RP: RP called the user.

    System.String userVisibleData

    The text to be displayed and signed. The text can be formatted using CR, LF and CRLF for new lines.

    Returns
    Type Description
    Task<PhoneSignResponse>
    | Improve this Doc View Source

    PhoneSignAsync(IBankIdAppApiClient, String, CallInitiator, String, Byte[])

    Declaration
    public static Task<PhoneSignResponse> PhoneSignAsync(this IBankIdAppApiClient appApiClient, string personalIdentityNumber, CallInitiator callInitiator, string userVisibleData, byte[] userNonVisibleData)
    Parameters
    Type Name Description
    IBankIdAppApiClient appApiClient

    The IBankIdAppApiClient instance.

    System.String personalIdentityNumber

    The personal number of the user. String. 12 digits.

    CallInitiator callInitiator

    Indicate if the user or the RP initiated the phone call. user: user called the RP. RP: RP called the user.

    System.String userVisibleData

    The text to be displayed and signed. The text can be formatted using CR, LF and CRLF for new lines.

    System.Byte[] userNonVisibleData

    Data not displayed to the user.

    Returns
    Type Description
    Task<PhoneSignResponse>

    If the request is successful, the OrderRef is returned.

    | Improve this Doc View Source

    SignAsync(IBankIdAppApiClient, String, String)

    Initiates an authentication order. Use the collect method to query the status of the order.

    Declaration
    public static Task<SignResponse> SignAsync(this IBankIdAppApiClient appApiClient, string endUserIp, string userVisibleData)
    Parameters
    Type Name Description
    IBankIdAppApiClient appApiClient

    The IBankIdAppApiClient instance.

    System.String endUserIp

    The user IP address as seen by RP.String.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.

    System.String userVisibleData

    The text to be displayed and signed. The text can be formatted using CR, LF and CRLF for new lines.

    Returns
    Type Description
    Task<SignResponse>

    If the request is successful, the OrderRef and AutoStartToken is returned.

    | Improve this Doc View Source

    SignAsync(IBankIdAppApiClient, String, String, Byte[])

    Initiates an authentication order. Use the collect method to query the status of the order.

    Declaration
    public static Task<SignResponse> SignAsync(this IBankIdAppApiClient appApiClient, string endUserIp, string userVisibleData, byte[] userNonVisibleData)
    Parameters
    Type Name Description
    IBankIdAppApiClient appApiClient

    The IBankIdAppApiClient instance.

    System.String endUserIp

    The user IP address as seen by RP.String.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.

    System.String userVisibleData

    The text to be displayed and signed. The text can be formatted using CR, LF and CRLF for new lines.

    System.Byte[] userNonVisibleData

    Data not displayed to the user.

    Returns
    Type Description
    Task<SignResponse>

    If the request is successful, the OrderRef and AutoStartToken is returned.

    • Improve this Doc
    • View Source
    In This Article
    Back to top © Active Solution