Replace old authentication components #95
Merged
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.
Utilize the configurable authentication component templates implemented in wallet-enterprise
This PR provides an easy way to re-use the Local & VID authentication components by creating a generic authentication component for each of the methods, providing only a configuration in JSON format.
Example in diploma-issuer:
In the GenericVIDAuthenticationComponent the third argument is a JSON object where the keys are the database columns in which the authentication component will map the value received from the presentation in the field name "Document Number".
Similarly for the GenericLocalAuthenticationComponent, but in this case we need to give the authentication component the specific column name from the excel dataset to extract the value.
The forth argument in the GenericLocalAuthenticationComponent is the dataset provider which is a callback function that will be called everytime the authentication components wants to access the dataset.
The fifth argument of GenericLocalAuthenticationComponent is the default accounts that can be used by everyone from the dropdown menu.
Depends on: