-
-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathBankIdUiApiInitializeResponse.cs
More file actions
52 lines (44 loc) · 1.96 KB
/
BankIdUiApiInitializeResponse.cs
File metadata and controls
52 lines (44 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
namespace ActiveLogin.Authentication.BankId.AspNetCore.Areas.ActiveLogin.Models;
public class BankIdUiApiInitializeResponse
{
internal BankIdUiApiInitializeResponse(
bool isAutoLaunch,
bool deviceMightRequireUserInteractionToLaunchBankIdApp,
bool checkStatus,
string orderRef,
string? launchUrl,
string? qrStartState,
string? qrCodeAsBase64)
{
IsAutoLaunch = isAutoLaunch;
DeviceMightRequireUserInteractionToLaunchBankIdApp = deviceMightRequireUserInteractionToLaunchBankIdApp;
CheckStatus = checkStatus;
OrderRef = orderRef;
LaunchUrl = launchUrl;
QrStartState = qrStartState;
QrCodeAsBase64 = qrCodeAsBase64;
}
public bool IsAutoLaunch { get; }
public bool DeviceMightRequireUserInteractionToLaunchBankIdApp { get; }
public bool CheckStatus { get; }
public string OrderRef { get; }
public string? LaunchUrl { get; }
public string? QrStartState { get; set; }
public string? QrCodeAsBase64 { get; set; }
public static BankIdUiApiInitializeResponse AutoLaunch(string orderRef, string redirectUri, bool showLaunchButton)
{
return new BankIdUiApiInitializeResponse(true, showLaunchButton, false, orderRef, redirectUri, null, null);
}
public static BankIdUiApiInitializeResponse AutoLaunchAndReloadPage(string orderRef, string launchUrl, bool showLaunchButton)
{
return new BankIdUiApiInitializeResponse(true, showLaunchButton, false, orderRef, launchUrl, null, null);
}
public static BankIdUiApiInitializeResponse ManualLaunch(string orderRef, string qrStartState, string qrCodeAsBase64)
{
return new BankIdUiApiInitializeResponse(false, false, true, orderRef, null, qrStartState, qrCodeAsBase64);
}
public static BankIdUiApiInitializeResponse ManualLaunch(string orderRef)
{
return new BankIdUiApiInitializeResponse(false, false, true, orderRef, null, null, null);
}
}