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 a AuthorizationResponsePreparationState
Add finalizeAuthorizationResponseParameters: Returns what createAuthenticationParams returned before, but also takes in AuthorizationResponsePreparationState and an optional non-default submission
Add finalizeAuthorizationResponse: Returns what createAuthenticationResponse did before
Add AuthorizationResponsePreparationState: Holds data necessary for presentation building
Add AuthenticationRequestParser: Extracted presentation request parsing logic from OidcSiopWallet and put it here
Add AuthorizationRequestValidator: Extracted presentation request validation logic from OidcSiopWallet and put it here
Add PresentationFactory: Extracted presentation response building logic from OidcSiopWallet and put it here
Also added some code for presentation submission validation
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
OidcSiopWallet
:startAuthorizationResponsePreparation
: Gathers data necessary for presentation building and yields aAuthorizationResponsePreparationState
finalizeAuthorizationResponseParameters
: Returns whatcreateAuthenticationParams
returned before, but also takes inAuthorizationResponsePreparationState
and an optional non-default submissionfinalizeAuthorizationResponse
: Returns whatcreateAuthenticationResponse
did beforeAuthorizationResponsePreparationState
: Holds data necessary for presentation buildingAuthenticationRequestParser
: Extracted presentation request parsing logic fromOidcSiopWallet
and put it hereAuthorizationRequestValidator
: Extracted presentation request validation logic fromOidcSiopWallet
and put it herePresentationFactory
: Extracted presentation response building logic fromOidcSiopWallet
and put it here