Class BankIdAppApiClient
HTTP based client for the BankID App API.
Inheritance
Implements
Namespace: ActiveLogin.Authentication.BankId.Api
Assembly: ActiveLogin.Authentication.BankId.Api.dll
Syntax
public class BankIdAppApiClient : object, IBankIdAppApiClient
Constructors
| Improve this Doc View SourceBankIdAppApiClient(HttpClient)
Creates an instance of BankIdAppApiClient using the supplied
Declaration
public BankIdAppApiClient(HttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
HttpClient | httpClient | The HttpClient to use. |
Methods
| Improve this Doc View SourceAuthAsync(AuthRequest)
Initiates an authentication order. Use the collect method to query the status of the order.
Declaration
public Task<AuthResponse> AuthAsync(AuthRequest request)
Parameters
Type | Name | Description |
---|---|---|
AuthRequest | request |
Returns
Type | Description |
---|---|
Task<AuthResponse> | If the request is successful, the OrderRef and AutoStartToken is returned. |
CancelAsync(CancelRequest)
Cancels an ongoing sign or auth order. This is typically used if the user cancels the order in your service or app.
Declaration
public Task<CancelResponse> CancelAsync(CancelRequest request)
Parameters
Type | Name | Description |
---|---|---|
CancelRequest | request |
Returns
Type | Description |
---|---|
Task<CancelResponse> |
CollectAsync(CollectRequest)
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 Task<CollectResponse> CollectAsync(CollectRequest request)
Parameters
Type | Name | Description |
---|---|---|
CollectRequest | request |
Returns
Type | Description |
---|---|
Task<CollectResponse> | The user identity is returned when complete. |
PaymentAsync(PaymentRequest)
Initiates a payment order. Use the collect method to query the status of the order.
Declaration
public Task<PaymentResponse> PaymentAsync(PaymentRequest request)
Parameters
Type | Name | Description |
---|---|---|
PaymentRequest | request |
Returns
Type | Description |
---|---|
Task<PaymentResponse> | If the request is successful, the OrderRef and AutoStartToken is returned. |
PhoneAuthAsync(PhoneAuthRequest)
Initiates a phone authentication order. Use the collect method to query the status of the order.
Declaration
public Task<PhoneAuthResponse> PhoneAuthAsync(PhoneAuthRequest request)
Parameters
Type | Name | Description |
---|---|---|
PhoneAuthRequest | request |
Returns
Type | Description |
---|---|
Task<PhoneAuthResponse> | If the request is successful, the OrderRef is returned. |
PhoneSignAsync(PhoneSignRequest)
Initiates a phone signing order. Use the collect method to query the status of the order.
Declaration
public Task<PhoneSignResponse> PhoneSignAsync(PhoneSignRequest request)
Parameters
Type | Name | Description |
---|---|---|
PhoneSignRequest | request |
Returns
Type | Description |
---|---|
Task<PhoneSignResponse> | If the request is successful, the OrderRef is returned. |
SignAsync(SignRequest)
Initiates a signing order. Use the collect method to query the status of the order.
Declaration
public Task<SignResponse> SignAsync(SignRequest request)
Parameters
Type | Name | Description |
---|---|---|
SignRequest | request |
Returns
Type | Description |
---|---|
Task<SignResponse> | If the request is successful, the OrderRef and AutoStartToken is returned. |