From 619e7acef746fd9ae6bfef842f3fecb636402a3d Mon Sep 17 00:00:00 2001 From: Nathaniel Steers Date: Mon, 16 Sep 2024 13:38:14 +0100 Subject: [PATCH] PP-13146 update created api key warning next (#4271) Co-authored-by: Alan Maddrell --- app/views/api-keys/create.njk | 116 +++++++++++++++++----------------- 1 file changed, 59 insertions(+), 57 deletions(-) diff --git a/app/views/api-keys/create.njk b/app/views/api-keys/create.njk index dfbcadff09..a998e5ed03 100644 --- a/app/views/api-keys/create.njk +++ b/app/views/api-keys/create.njk @@ -1,7 +1,7 @@ {% extends "../layout.njk" %} {% block pageTitle %} -Create an API key - {{currentService.name}} {{currentGatewayAccount.full_type}} - GOV.UK Pay + Create an API key - {{ currentService.name }} {{ currentGatewayAccount.full_type }} - GOV.UK Pay {% endblock %} {% block side_navigation %} @@ -9,14 +9,15 @@ Create an API key - {{currentService.name}} {{currentGatewayAccount.full_type}} {% endblock %} {% block mainContent %} -
- {% if not token %} -

Create an API key

-
- +
+ {% if not token %} +

Create an API key

+ + - {{ - govukInput({ + {{ govukInput({ id: "description", name: "description", type: "text", @@ -30,53 +31,53 @@ Create an API key - {{currentService.name}} {{currentGatewayAccount.full_type}} hint: { text: "For example, “John Smith’s API key”" } - }) - }} -

When generated the key will only be shown once.

+ }) }} +

When generated the key will only be shown once.

- {{ - govukButton({ + {{ govukButton({ text: "Continue", attributes: { id: "generate-button" } - }) - }} - -

- Cancel -

- {% else %} -

New API key

-

Copy your key to somewhere safe. You won’t be able to see it again once you leave this page. You must copy the whole key, including the api_test_ or api_live_ prefix.

+ }) }} + +

+ Cancel +

+ {% else %} +

New API key

-
- - - Warning -

API security

+
+ + + Warning +

Store your API key securely

+
+ +

Do not:

    -
  • You must store your API keys securely.
  • -
  • You must not share this key in publicly accessible documents or repositories.
  • -
  • You must not share it with anyone who should not be using the GOV.UK Pay API directly.
  • -
-
- -

- More about securing your API keys. -

-
-
+
  • email it to anyone
  • +
  • keep it in documents or repositories publicly available on the internet
  • +
  • share it with anyone who should not have direct access to the GOV.UK Pay API
  • + +

    Copy your key to somewhere safe. You will not be able to see it again after you leave this + page. You must copy the whole key, including the api_test_ or api_live_ prefix.

    +

    + More about securing + your API keys. +

    +
    -

    - {{description}} -

    -
    - {{token}} -
    +

    + {{ description }} +

    +
    + {{ token }} +
    - {{ - govukButton({ + {{ govukButton({ text: "Copy API key to clipboard", classes: "govuk-button--secondary govuk-!-margin-top-4", attributes: { @@ -84,18 +85,19 @@ Create an API key - {{currentService.name}} {{currentGatewayAccount.full_type}} "data-copy-text": true, "data-target": "copy-this-api-key", "data-success": "API key has been copied", - "data-notification-target": "copy-this-api-key-notification" + "data-notification-target": "copy-this-api-key-notification" } - }) - }} + }) }} -
    +
    -

    - - Back to API keys - -

    - {% endif %} -
    +

    + + Back to API keys + +

    + {% endif %} +
    {% endblock %}