-
-
Notifications
You must be signed in to change notification settings - Fork 77
Feature/470 use new auth properties app and web #477
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
Merged
elinohlsson
merged 15 commits into
main
from
feature/470-use-new-auth-properties-app-and-web
Jan 17, 2025
Merged
Feature/470 use new auth properties app and web #477
elinohlsson
merged 15 commits into
main
from
feature/470-use-new-auth-properties-app-and-web
Jan 17, 2025
Conversation
This file contains hidden or 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
Contributor
elinohlsson
left a comment
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
Outdated
Show resolved
Hide resolved
test/ActiveLogin.Authentication.BankId.Api.Test/Models/RequestDeviceParametersTests.cs
Outdated
Show resolved
Hide resolved
elinohlsson
approved these changes
Jan 16, 2025
Liteolika
commented
Jan 17, 2025
Liteolika
commented
Jan 17, 2025
Liteolika
commented
Jan 17, 2025
src/ActiveLogin.Authentication.BankId.Api/Models/SignRequest.cs
Outdated
Show resolved
Hide resolved
Liteolika
commented
Jan 17, 2025
src/ActiveLogin.Authentication.BankId.Api/Models/AuthRequest.cs
Outdated
Show resolved
Hide resolved
Updated AuthRequest, SignRequest, and Request classes to replace deviceParameters with web and app parameters to comply with Bank ID api. Removed SetDeviceParameters method from Request class. Updated BankIdFlowService to handle new parameters and added GetDeviceData method. Modified BankIdAppApiClient_Tests to reflect constructor changes. Removed RequestDeviceParametersTests as it is no longer relevant. #470
elinohlsson
approved these changes
Jan 17, 2025
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]AuthRequestandSignRequestmodels to includedeviceParametersfor passing device information (src/ActiveLogin.Authentication.BankId.Api/Models/AuthRequest.cs,src/ActiveLogin.Authentication.BankId.Api/Models/SignRequest.cs). [1] [2]Codebase Enhancements
Program.csfile 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).