Separate authentication response building steps in SiopWallet
requested to merge feature/2024/06/27-refactor-siop-wallet-separate-authentication-response-building-steps into develop
Created by: acrusage-iaik
Separates the response building into two phases, allowing the user of the library to select credentials and attributes to be disclosed, but leaves the original logic in tact using default submissions
- Change
OidcSiopWallet
:- Add
startAuthorizationResponsePreparation
: Gathers data necessary for presentation building and yields aAuthorizationResponsePreparationState
- Add
finalizeAuthorizationResponseParameters
: Returns whatcreateAuthenticationParams
returned before, but also takes inAuthorizationResponsePreparationState
and an optional non-default submission - Add
finalizeAuthorizationResponse
: Returns whatcreateAuthenticationResponse
did before
- Add
- Add
AuthorizationResponsePreparationState
: Holds data necessary for presentation building - Add
AuthenticationRequestParser
: Extracted presentation request parsing logic fromOidcSiopWallet
and put it here - Add
AuthorizationRequestValidator
: Extracted presentation request validation logic fromOidcSiopWallet
and put it here - Add
PresentationFactory
: Extracted presentation response building logic fromOidcSiopWallet
and put it here- Also added some code for presentation submission validation