-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Samsung Internet Browser and Opera on Android (#254)
Add device info to logging
- Loading branch information
1 parent
f090be8
commit 2fea270
Showing
21 changed files
with
228 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 4 additions & 18 deletions
22
src/ActiveLogin.Authentication.BankId.AspNetCore/Launcher/BankIdDevelopmentLauncher.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,13 @@ | ||
using ActiveLogin.Authentication.BankId.AspNetCore.SupportedDevice; | ||
using Microsoft.AspNetCore.Http; | ||
|
||
namespace ActiveLogin.Authentication.BankId.AspNetCore.Launcher | ||
{ | ||
internal class BankIdDevelopmentLauncher : IBankIdLauncher | ||
{ | ||
public string GetLaunchUrl(BankIdSupportedDevice device, LaunchUrlRequest request) | ||
public BankIdLaunchInfo GetLaunchInfo(LaunchUrlRequest request, HttpContext httpContext) | ||
{ | ||
if (device.DeviceOs == BankIdSupportedDeviceOs.Ios) | ||
{ | ||
return request.RedirectUrl; | ||
} | ||
|
||
return "#"; | ||
} | ||
|
||
public bool GetDeviceMightRequireUserInteractionToLaunchBankIdApp(BankIdSupportedDevice detectedDevice) | ||
{ | ||
return false; | ||
} | ||
|
||
public bool GetDeviceWillReloadPageOnReturnFromBankIdApp(BankIdSupportedDevice detectedDevice) | ||
{ | ||
return false; | ||
// Always redirect back without user interaction in simulated mode | ||
return new BankIdLaunchInfo(request.RedirectUrl, false, false); | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/ActiveLogin.Authentication.BankId.AspNetCore/Launcher/BankIdLaunchInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace ActiveLogin.Authentication.BankId.AspNetCore.Launcher | ||
{ | ||
public class BankIdLaunchInfo | ||
{ | ||
public BankIdLaunchInfo(string launchUrl, bool deviceMightRequireUserInteractionToLaunchBankIdApp, bool deviceWillReloadPageOnReturnFromBankIdApp) | ||
{ | ||
LaunchUrl = launchUrl; | ||
DeviceMightRequireUserInteractionToLaunchBankIdApp = deviceMightRequireUserInteractionToLaunchBankIdApp; | ||
DeviceWillReloadPageOnReturnFromBankIdApp = deviceWillReloadPageOnReturnFromBankIdApp; | ||
} | ||
|
||
/// <summary> | ||
/// Returns the url used to launch the BankID app. | ||
/// </summary> | ||
public string LaunchUrl { get; } | ||
|
||
/// <summary> | ||
/// If the device/browser might require user interaction, such as button click, to launch a third party app. | ||
/// </summary> | ||
/// <returns></returns> | ||
public bool DeviceMightRequireUserInteractionToLaunchBankIdApp { get; } | ||
|
||
/// <summary> | ||
/// If the device/browser will reload the page on return from the BankID app. | ||
/// </summary> | ||
/// <returns></returns> | ||
public bool DeviceWillReloadPageOnReturnFromBankIdApp { get; } | ||
} | ||
} |
Oops, something went wrong.