-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/470 use new auth properties app and web #477
Open
Liteolika
wants to merge
12
commits into
main
Choose a base branch
from
feature/470-use-new-auth-properties-app-and-web
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
implementation to support the app/web properties in the request and sign api calls. #370
Updated `BankIdDefaultEndUserAppDeviceDataResolver` to include new properties and improved exception messages. Modified `TryGetAppDeviceParameters` to return a new `DeviceDataApp` object. Added `BankIdBuilderDeviceDataExtensions` class with `UseDeviceData` method for configuring end user device data. Refactored `BankIdEndUserDeviceConfigurationBuilder` to remove `IServiceCollection` dependency, using `ServiceDescriptor` for `ResolverFactory` and `Resolvers`. Added methods for adding device resolvers via factory method. Removed `IBankIdBuilderExtensions` class, moved functionality to `BankIdBuilderDeviceDataExtensions`. Updated `IBankIdEndUserDeviceConfigurationBuilder` interface to use `ServiceDescriptor` and added method for factory resolvers. Simplified `IBankIdEndUserDeviceDataConfiguration` interface. Updated tests in `BankIdBuilderExtensions_Tests`, `BankIdEndUserDeviceConfigurationBuilder_Tests`, and `DefaultBankIdEndUserDeviceDataConfiguration_Tests` to reflect changes. Updated `FakeResolver` and `FakeResolverFactory` classes and various `using` directives and namespaces.
Introduced a new feature for resolving end-user device data in BankID authentication and signing requests, enhancing security and user experience. Updated `Program.cs` to include the new `UseDeviceData` configuration for customizable device data resolvers. Refactored various files to improve code maintainability and readability, including `BankIdCommonConfiguration.cs`, `ServiceCollectionBankIdExtensions.cs`, and `BankIdBuilderDeviceDataExtensions.cs`. Added and updated unit tests to ensure correct implementation and functionality of the new feature.
elinohlsson
reviewed
Dec 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! Just had some smaller comments and a suggestion for improvement of the documentation.
src/ActiveLogin.Authentication.BankId.Core/ActiveLogin.Authentication.BankId.Core.csproj
Outdated
Show resolved
Hide resolved
test/ActiveLogin.Authentication.BankId.Api.Test/Models/RequestDeviceParametersTests.cs
Show resolved
Hide resolved
test/ActiveLogin.Authentication.BankId.Api.Test/Models/RequestDeviceParametersTests.cs
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes #470 .
High level overview of this PR:
This pull request introduces a new feature to include detailed information about the end user's device in BankID authentication and signing requests. This complies with the BankID API recommendations.
New Feature: User Device Data
docs/articles/bankid.md
). [1] [2]IBankIdEndUserDeviceData
,DeviceData
,DeviceDataApp
, andDeviceDataWeb
(src/ActiveLogin.Authentication.BankId.Api/IBankIdEndUserDeviceData.cs
,src/ActiveLogin.Authentication.BankId.Api/Models/DeviceData.cs
,src/ActiveLogin.Authentication.BankId.Api/Models/DeviceDataApp.cs
,src/ActiveLogin.Authentication.BankId.Api/Models/DeviceDataWeb.cs
). [1] [2] [3] [4]AuthRequest
andSignRequest
models to includedeviceParameters
for passing device information (src/ActiveLogin.Authentication.BankId.Api/Models/AuthRequest.cs
,src/ActiveLogin.Authentication.BankId.Api/Models/SignRequest.cs
). [1] [2]Codebase Enhancements
Program.cs
file in the sample project to demonstrate the use of the new User Device feature (samples/Standalone.MvcSample/Program.cs
). [1] [2]src/ActiveLogin.Authentication.BankId.AspNetCore/DataProtection/BankIdDeviceDataProtector.cs
,src/ActiveLogin.Authentication.BankId.AspNetCore/DataProtection/IBankIdDeviceDataProtector.cs
). [1] [2]Bug Fixes and Miscellaneous
docs/articles/bankid.md
).src/ActiveLogin.Authentication.BankId.AspNetCore/BankIdConstants.cs
).