Skip to main content

Application: account-api

An account for GOV.UK

GitHub
account-api
Ownership
#govuk-accounts-tech
Hosting
AWS, on the account machine class
Rake tasks
Integration, Staging or ⚠️ Production ⚠️

Imported documents

Example pages published by account-api

README

Provides sign in / sign out and attribute storage functionality to other GOV.UK applications.

In production, this app currently uses the Digital Identity authentication service.

In development, this app uses a stub OIDC provider which signs you in as the first user in the database.

This app does not serve any user-facing pages. To see the app working, you must run an app which uses it, such as Finder Frontend.

After starting Finder Frontend, you should be able to access the following links:

Technical documentation

This is a Ruby on Rails app, and should follow our Rails app conventions.

Use GOV.UK Docker to run any of the following commands.

Testing

This repository follows the standards for testing described in the GOV.UK RFC on continuous deployment:

  • code coverage in excess of 95%
  • API contract tests (“pact tests”) between the Account API and its consumers
  • a smoke test to check the application is running after a deployment

The default rake task runs all the tests and records code coverage:

bundle exec rake

Changing the Pact tests

If you make changes to the API, you must update the Pact tests.

A Pact test has two parts:

  1. The consumer test (defined in gds-api-adapters), which:

    • specifies the state it expects the provider to be in
    • gives a request to make
    • and a response to match against
  2. The provider configuration (defined in this repo), which defines all of the provider states referenced by the consumer tests.

See the GOV.UK Developer Docs for how to update a Pact test.

Further documentation

Licence

MIT License