Description
It lets you determine whether a logged-in user has enough data defined in a section. It comprises 2 parts:
- Check if data need to be completed.
- If they need to be completed, show the user an appropriate interface.
This flow is handled using 2 calls to 2 methods.
Step 1: Check if data need to be completed
To check if a user needs to complete the data for a specific section, a call has to be made to the DRUID API with the following data:
Endpoint URL:
GET https://{your-endpoint-domain.com}/user/api
Request parameters
Parameter | Description | Type |
w.section | The entry point about which you want to ask. | string |
f | For this case, this parameter must be set to UserMeta | string |
s | For this case, this parameter must be set to needsToCompleteData | string |
oauth_token | access_token of the logged user | string |
Request example
Response
Attribute | Description |
userBelongsTypology | User belongs to scope typology |
needsToCompleteOptionalData | User does not have some optional field filled, so you can redirect user to complete_account to allow fill it |
needsToConfirmIds | User have pending id confirmation (eg: email, mobile..) so you can redirect user to complete_account to allow confirm it |
needsToCompleteData | User does not have some mandatory field filled, so you can redirect user to complete_account to allow fill it |
needsToAcceptConsents | The user has some non mandatory consent to false, so you can eventually redirect user to the data completion to allow you to set it to true if he/she wish. |
needsToAcceptTerms | User must accept some t&c . After login. The user will be required to accept them if he/she wants to continue. |
Step 2: Call to the complete account endpoint
If some data need to be completed, the user has to be asked to complete them. All the parameters have to be appropriately coded.
eg:
https://register.dev.dru-id.com/register/complete_account_input?next=https%3A%2F%2Fauth.dev.dru-id.com%2Foauth2%2Fauthorize%2Fredirect%3Fclient_id%3D231705665113870%26redirect_uri%3Dhttps%253A%252F%252Fshowcase.dev.dru-id.com%252Fshowcase%252Fcallback&completeDataFieldTypes=MANDATORY&completeDataFieldTypes=CONSENTS&oauth_token=231705665113870%7C3%7C2.m2JKxgUfJ4Orm1.3600.1671616474114%7C-ur6k-uzE20TuPGBKcgJdA2_Lq3Yw1MmwJjiTprJhQc.&scope=231705665113870-main&cancel_url=https%3A%2F%2Fauth.dev.dru-id.com%2Foauth2%2Fauthorize%2Fredirect%3Fclient_id%3D231705665113870%26redirect_uri%3Dhttps%253A%252F%252Fshowcase.dev.dru-id.com%252Fshowcase%252Fcallback
Endpoint URL:
GET https://register.{your-endpoint-domain.com}/register/complete_account_input
Request parameters
Parameter | Description | Type |
next | url encoded of oauth2/authorize endpoint with callback (refer to SDK code for more detail) | string |
completeDataFieldTypes | any of MANDATORY, OPTIONAL, CONSENTS (multiple values can be sent) | MANDATORY, OPTIONAL, CONSENTS |
oauth_token | client token (do no send user access token) | string |
scope | entrypoint to use | string |
cancel_url | url encoded of oauth2/authorize endpoint with callback (refer to SDK code for more detail) | string |