-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #192 from govuk-one-login/return-codes-guidance
uploads guidance on return codes
- Loading branch information
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,10 @@ You can find details of the claims in the following table. | |
| `https://vocab.account.gov.uk/v1/passport` | This claim contains your user's passport details if GOV.UK One Login proved their identity using their passport.<br><br>If GOV.UK One Login did not prove your user’s identity using their passport, the authorisation response will not return this claim. | | ||
| `https://vocab.account.gov.uk/v1/drivingPermit` | This claim contains your user's driving licence details if GOV.UK One Login proved their identity using their driving licence.<br><br>If GOV.UK One Login did not prove your user’s identity using their driving licence, the authorisation response will not return this claim. | | ||
| `https://vocab.account.gov.uk/v1/socialSecurityRecord` | This claim contains your user's National Insurance number if GOV.UK One Login proved their identity using their National Insurance number.<br><br>If GOV.UK One Login did not prove your user’s identity using their National Insurance number, the authorisation response will not return this claim. | | ||
| `https://vocab.account.gov.uk/v1/returnCode` | This claim gives information about any issues with the evidence your user provided to prove their identity, for example, if GOV.UK One Login was not able to prove your user’s identity. This will display as a letter code, for example `[{"code": "C"}]`, in the response. <br><br> For security reasons, you’ll have to contact GOV.UK One Login on [[email protected]](mailto:[email protected]) for more detailed information on what issue each return code represents. | ||
|
||
<br><br> | ||
If you do not include this claim in your request, GOV.UK One Login returns an `access_denied` error instead. | | ||
|
||
You can see more about the structure of this information when you [prove your user’s identity](integrate-with-integration-environment/prove-users-identity). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -247,6 +247,50 @@ licence, if they submitted one when proving their identity. | |
| `issuedBy` | The organisation that issued the driving licence. | | ||
| `personalNumber` | The driver number of the driving licence. This is a string unique to the user. | | ||
|
||
## Understand your user’s return code claim | ||
|
||
The `https://vocab.account.gov.uk/v1/returnCode` claim gives information about any issues with the evidence your user provided to prove their identity. For example, if GOV.UK One Login was not able to prove your user’s identity. | ||
|
||
To use this claim, you must let us know when [registering your service with GOV.UK One Login][integrate.register-your-service]. | ||
|
||
When you use this claim and there’s an issue with the evidence your user provided to prove their identity: | ||
|
||
1. You’ll receive an authorisation code in the `redirect_uri` instead of an `access_denied` error. | ||
1. Use this authorisation code to get an ID token and an access token. | ||
1. When you make a request to the `/userinfo` endpoint using the access token, the response may contain only authentication data, and an array of one or more `returnCode` values, for example `[{"code": "B"},{"code": "C"}]`. | ||
1. For security reasons, you’ll need to contact GOV.UK One Login on [[email protected]](mailto:[email protected]) for more detailed information on what each return code means. | ||
|
||
You may receive a return code even if a user’s identity verification is successful. Contact GOV.UK One Login on [[email protected]](mailto:[email protected]) for more detailed information on what each return code means. | ||
|
||
| Property | Definition | | ||
|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `code` | An array of single letter codes for `returnCode` values. <br><br> You can use these codes to identify the reason(s) for any issues that occurred during the identity proving journey. For security reasons, you’ll need to contact GOV.UK One Login on [[email protected]](mailto:[email protected]) for more detailed information on what each return code means. | ||
|
||
If you want to add this feature to an existing integration, contact GOV.UK One Login on [[email protected]](mailto:[email protected]) to update your client registration. You must also update your code to make sure your integration is able to use the new behaviour. | ||
|
||
|
||
``` | ||
HTTP/1.1 200 OK | ||
Content-Type: application/json | ||
{ | ||
"sub": "urn:fdc:gov.uk:2022:56P4CMsGh_02YOlWpd8PAOI-2sVlB2nsNU7mcLZYhYw=", | ||
"email": "[email protected]", | ||
"email_verified": true, | ||
"phone_number": "01406946277", | ||
"phone_number_verified": true, | ||
"updated_at":1311280970, | ||
"https://vocab.account.gov.uk/v1/returnCode": [ | ||
{ | ||
"code": "B" | ||
}, | ||
{ | ||
"code": "C" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
|
||
## Understand your user's National Insurance number claim | ||
The <code>https://vocab.account.gov.uk/v1/socialSecurityRecord</code> claim contains the details of your user’s National | ||
Insurance Number, if they submitted it while proving their identity. | ||
|