Skip to content

Commit

Permalink
Merge pull request #211 from govuk-one-login/default-identity-config
Browse files Browse the repository at this point in the history
Add  default identity response to config.ts
  • Loading branch information
Ryan-Andrews99 authored Dec 11, 2024
2 parents 61bd7d8 + c110fc5 commit e3e505e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ The default values for each configurable field are outlined below:
| Public Key | `-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmXXR3EsRvUMVhEJMtQ1wexJjfQ00Q0MQ7ARfShN53BnOQEPFnS/I8ntBddkKdE3q+vMTI72w6Fv3SsMM+ciR2LIHdEQfKgsLt6PGNcV1kG6GG/3nSW3psW8w65Q3fmy81P1748qezDrVfaGrF4PDXALzX1ph+nz8mpKmck6aY6LEUJ4B+TIfYzlKmmwFe3ri0spSW+J5wE9mmT3VkR2ySuHRYHQlxlF9dfX7ltOTsbgJFzN6TO01ZQDhY0iLwzdGwhSxO6R6N/ZINYHCKFPaQD+tdKsrw7QDIYnx0IiXFnkGnizl3UtqSmXAaceTvPM2Pz84x2JiwHrp2Sml6RYLCQIDAQAB-----END PUBLIC KEY-----` |
| Scopes | `["openid", "email", "phone"]` |
| Redirect URLs | `["http://localhost:8080/oidc/authorization-code/callback"]` |
| Claims | `["https://vocab.account.gov.uk/v1/coreIdentityJWT"]` |
| Claims | `["https://vocab.account.gov.uk/v1/coreIdentityJWT","https://vocab.account.gov.uk/v1/address","https://vocab.account.gov.uk/v1/returnCode"]` |
| Identity Verification Supported | `true` |
| ID Token Signing Algorithm | `ES256` |
| Client Levels of Confidence | `["P0", "P2"]` |
Expand All @@ -268,11 +268,11 @@ The default values for each configurable field are outlined below:
| phoneNumber | `07123456789` |
| phoneNumberVerified | `true` |
| maxLoCAchieved | `P2` |
| coreIdentityVerifiableCredentials | `null` |
| coreIdentityVerifiableCredentials | `{"type":["VerifiableCredential","IdentityCheckCredential"],"credentialSubject":{"name":[{"nameParts":[{"value":"GEOFFREY","type":"GivenName"},{"value":"HEARNSHAW","type":"FamilyName"}]}],"birthDate":[{"value":"1955-04-19"}]}}` |
| passportDetails | `null` |
| drivingPermitDetails | `null` |
| socialSecurityRecordDetails | `null` |
| postalAddressDetails | `null` |
| postalAddressDetails | `{"postalAddressDetails":[{"addressCountry":"GB","buildingName":"","streetName":"FRAMPTON ROAD","postalCode":"GL1 5QB","buildingNumber":"26","addressLocality":"GLOUCESTER","validFrom":"2000-01-01","uprn":100120472196,"subBuildingName":""}]}` |
| returnCodes | `null` |
| simulatorUrl | `http://localhost:3000` |
| postLogoutRedirectUrls | `["http://localhost:8080/signed-out]` |
Expand Down
47 changes: 43 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ CQIDAQAB
: ["http://localhost:8080/signed-out"],
claims: process.env.CLAIMS
? (process.env.CLAIMS.split(",") as UserIdentityClaim[])
: ["https://vocab.account.gov.uk/v1/coreIdentityJWT"],
: [
"https://vocab.account.gov.uk/v1/coreIdentityJWT",
"https://vocab.account.gov.uk/v1/address",
"https://vocab.account.gov.uk/v1/returnCode",
],
identityVerificationSupported:
process.env.IDENTITY_VERIFICATION_SUPPORTED !== "false",
idTokenSigningAlgorithm:
Expand All @@ -71,12 +75,47 @@ CQIDAQAB
phoneNumber: process.env.PHONE_NUMBER ?? "07123456789",
phoneNumberVerified: process.env.PHONE_NUMBER_VERIFIED !== "false",
maxLoCAchieved: "P2",
coreIdentityVerifiableCredentials: null,
coreIdentityVerifiableCredentials: {
type: ["VerifiableCredential", "IdentityCheckCredential"],
credentialSubject: {
name: [
{
nameParts: [
{
value: "GEOFFREY",
type: "GivenName",
},
{
value: "HEARNSHAW",
type: "FamilyName",
},
],
},
],
birthDate: [
{
value: "1955-04-19",
},
],
},
},
passportDetails: null,
drivingPermitDetails: null,
socialSecurityRecordDetails: null,
postalAddressDetails: null,
returnCodes: null,
postalAddressDetails: [
{
addressCountry: "GB",
buildingName: "",
streetName: "FRAMPTON ROAD",
postalCode: "GL1 5QB",
buildingNumber: "26",
addressLocality: "GLOUCESTER",
validFrom: "2000-01-01",
uprn: 100120472196,
subBuildingName: "",
},
],
returnCodes: [],
};

this.errorConfiguration = {
Expand Down

0 comments on commit e3e505e

Please sign in to comment.