Customise Login using PEX Editor
When creating or updating a Login Configuration in Affinidi Portal, you can modify the default Presentation Definition and default ID Roken Mapping to request additional data or add other constraints to the requested data. At the same time, if you have defined the Presentation Definition with additional data, you must modify the ID Token Mapping to include these fields in the ID Token sent to the application upon successful user authentication.
You can read more about Presentation Definition and ID Token Mapping structure and learn how to modify these values to request data from the Affinidi Vault using this guide.
Using PEX Editor in Login Configuration
You can use the PEX Editor to create a new Login Configuration or update an existing one.
When creating a new Login Configuration, you can access PEX Editor by expanding the Additional Configuration section and clicking on the Create New or Edit buttons when editing an existing Login Configuration.
PEX Editor allows you to customise your Presentation Definition and ID Token Mapping:
Customising the Presentation Definition
The first step lets you modify the default Presentation Definition using the Presentation Exchange (PEX) query. Use the editor to alter the PEX query to request additional data from the Affinidi Vault or add more constraints to the requested data from the Affinidi Vault based on your application requirements.
After modifying the PEX query and clicking Continue, the editor will verify the query and inform you if it is invalid.
Customising the ID Token Mapping
The second step allows you to map the Presentation Definition with the ID Token to ensure that the data requested using the PEX query includes the fields in the idToken
sent to the application. The ID Token Mapping editor will suggest a mapping structure based on the defined presentation from the previous steps. You can modify it and ensure it correctly maps the sourceField
from the Presentation Definition and the idTokenClaim
for the idToken data. Additionally, we recommend providing the inputDescriptorId
if you have multiple inputDescriptor
in the Presentation Definition to prevent field conflict in the idToken.
The editor will warn you if the ID Token Mapping does not match the Presentation Definition (e.g. the mapping is missing a field defined in the Presentation Definition).
You always have the option to reset to the default values if you need to restart your actions or encounter an error after testing it with your application.
Glad to hear it! Please tell us how we can improve more.
Sorry to hear that. Please tell us how we can improve.
Thank you for sharing your feedback so we can improve your experience.