Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 2.63 KB

README.md

File metadata and controls

39 lines (23 loc) · 2.63 KB

openid-connect-userinfo

Build Status Download

The REST API, exposed by the HMRC API Platform as /userinfo to external clients, aims to provide a specification compliant OpenID Connect implementation. It allows consumers to access user details with consent and in the OpenID Connect UserInfo format.

A typical workflow would be:

  1. Authenticate.
  2. Access a user-info resource via GET or POST request

All end points are User Restricted (see authorisation). Versioning follows the API Platform standards (see the reference guide). User details data structures follow the OpenId Connect UserInfo specification (see the specification)

You can dive deeper into the documentation in the API Developer Hub.

Authentication tokens

Note, the /userinfo endpoint is an external API endpoint. This endpoint requires an API token for authentication.

API

Method HMRC API Platform Path Internal Path Description
GET /userinfo / Returns information about an End-User as requested in the openid scopes as documented in the published API document.
POST Internal use only /

Running Locally

Run the service sbt run -Drun.mode=Dev

Run the tests & test coverage report sbt clean coverage test it/test coverageReport

Run the service in service manager; if you want live endpoints, then start dependencies thus: sm2 --start AUTH DATASTREAM -r

Now you can test the sandbox curl -v http://localhost:9000/sandbox/userinfo -H 'Accept: application/vnd.hmrc.1.0+json'

License

This code is open source software licensed under the Apache 2.0 License