mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
Merge branch 'master' of https://github.com/alphagov/notifications-admin into vb-free-sms-history
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
{% from "components/table.html" import mapping_table, row, text_field, edit_field, field, row_heading%}
|
||||
{% extends "withoutnav_template.html" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
Callbacks
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
<h1 class="heading-large">Callbacks for received text messages</h1>
|
||||
|
||||
<p>
|
||||
Text messages you receive can be forwarded to a URL that you specify, using our callback feature.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Messages are forwarded as they are received.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To protect your service, we require you to provide a bearer token. We put this token in the authorisation header of the callback requests.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once you have ‘receive text messages’ enabled, you can set up your callback on the settings page of your service.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you don’t have ‘receive text messages’ enabled for your service, <a href="{{ url_for('.support') }}">get in touch</a> and we can turn it on for you.
|
||||
</p>
|
||||
|
||||
<h2 class="heading-medium">Format of the callback</h2>
|
||||
|
||||
<p>
|
||||
The format of the callback message you receive is JSON.
|
||||
</p>
|
||||
|
||||
<div class="bottom-gutter-3-2">
|
||||
{% call mapping_table(
|
||||
caption='Callback message format',
|
||||
field_headings=['Key', 'Description', 'Format'],
|
||||
field_headings_visible=True,
|
||||
caption_visible=False
|
||||
) %}
|
||||
{% for key, description, format in [
|
||||
('id', 'Notify’s id for the received message', 'UUID'),
|
||||
('source_number', 'The phone number the message was sent from', '447700912345'),
|
||||
('destination_number', 'The number the message was sent to (your number)', '07700987654'),
|
||||
('message', 'The received message', 'Hello Notify!'),
|
||||
('date_received', 'The UTC datetime that the message was received by Notify', '2017-05-14T12:15:30.000000Z')
|
||||
] %}
|
||||
{% call row() %}
|
||||
{% call row_heading() %} {{ key }} {% endcall %}
|
||||
{{ text_field(description) }}
|
||||
{{ text_field(format) }}
|
||||
{% endcall %}
|
||||
{% endfor %}
|
||||
{% endcall %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -33,7 +33,7 @@
|
||||
<li>formal risk assessments using a methodology based on
|
||||
<a href="http://www.iso.org/iso/catalogue_detail?csnumber=56742">ISO 27005</a>:2011
|
||||
and supplemented by reference to NCSC standards and guidance documentation</li>
|
||||
<li><a href="https://www.cesg.gov.uk/articles/check-fundamental-principles">CHECK</a>-based
|
||||
<li><a href="https://www.ncsc.gov.uk/articles/check-fundamental-principles">CHECK</a>-based
|
||||
IT Health Check (ITHC) testing (annual and on major change)</li>
|
||||
<li>residual risk statement preparation and active management of the risk treatment plan</li>
|
||||
<li>regular updates to the Privacy Impact Assessment</li>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<p>
|
||||
You should revoke and re-create these keys on a regular basis. You can have more than one active key at a time. To revoke a key click the revoke button on the API Key page.
|
||||
</p>
|
||||
|
||||
|
||||
<div class="panel panel-border-wide">
|
||||
<p>
|
||||
You should never send test messages to invalid numbers or addresses using a live key. This will lead to your API key being revoked.
|
||||
@@ -73,7 +73,7 @@
|
||||
Use a test key to test the performance of your service and its integration with GOV.UK Notify.
|
||||
</p>
|
||||
<p>
|
||||
Test keys don’t send real messages but do generates realistic responses.
|
||||
Test keys don’t send real messages but do generate realistic responses.
|
||||
There’s no restriction on who you can send to.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@@ -63,6 +63,15 @@
|
||||
user.has_permissions(permissions=['manage_api_keys']),
|
||||
'Access API keys'
|
||||
) }}
|
||||
{% if 'email_auth' in current_service['permissions'] %}
|
||||
<div class="tick-cross-list-hint">
|
||||
{% if user.auth_type == 'sms_auth' %}
|
||||
Signs in with a text message code
|
||||
{% else %}
|
||||
Signs in with an email link
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if current_user.has_permissions(['manage_users'], admin_override=True) %}
|
||||
{% if current_user.id != user.id %}
|
||||
@@ -104,6 +113,15 @@
|
||||
user.has_permissions(permissions=['manage_api_keys']),
|
||||
'Access API keys'
|
||||
) }}
|
||||
{% if 'email_auth' in current_service['permissions'] %}
|
||||
<div class="tick-cross-list-hint">
|
||||
{% if user.auth_type == 'sms_auth' %}
|
||||
Signs in with a text message code
|
||||
{% else %}
|
||||
Signs in with an email link
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<li class="tick-cross-list-edit-link">
|
||||
{% if user.status == 'pending' and current_user.has_permissions(['manage_users']) %}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% from "components/checkbox.html" import checkbox %}
|
||||
{% from "components/radios.html" import radios %}
|
||||
|
||||
<fieldset class="form-group">
|
||||
<legend class="form-label">
|
||||
@@ -20,3 +21,7 @@
|
||||
<li>who the other team members are</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if service_has_email_auth %}
|
||||
{{ radios(form.login_authentication, disable=['sms_auth' if user_has_no_mobile_number]) }}
|
||||
{% endif %}
|
||||
@@ -25,7 +25,7 @@
|
||||
action="{{ url_for('.view_notifications', service_id=current_service.id, message_type=message_type) }}"
|
||||
class="grid-row"
|
||||
>
|
||||
<div class="column-three-quarters">
|
||||
<div class="column-three-quarters {% if message_type == 'sms' %}extra-tracking{% endif %}">
|
||||
{{ textbox(
|
||||
search_form.to,
|
||||
width='1-1',
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
</div>
|
||||
<div class="column-third">
|
||||
{{ big_number_with_status(
|
||||
global_stats.letter.delivered + global_stats.letter.failed,
|
||||
message_count_label(global_stats.letter.delivered, 'letter'),
|
||||
global_stats.letter.requested,
|
||||
message_count_label(global_stats.letter.requested, 'letter'),
|
||||
global_stats.letter.failed,
|
||||
global_stats.letter.failure_rate,
|
||||
global_stats.letter.failure_rate|float > 3,
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
{% call row() %}
|
||||
{% if not service['active'] %}
|
||||
{% call field(status='default') %}
|
||||
{% call field(status='default', border=False) %}
|
||||
<span class="heading-medium">archived</span>
|
||||
{% endcall %}
|
||||
{% elif service['research_mode'] %}
|
||||
@@ -62,16 +62,26 @@
|
||||
<span class="research-mode">research mode</span>
|
||||
{% endcall %}
|
||||
{% elif not service['restricted'] %}
|
||||
{% call field(status='error') %}
|
||||
{% call field(status='error', border=False) %}
|
||||
<span class="heading-medium">Live</span>
|
||||
{% endcall %}
|
||||
{% else %}
|
||||
{{ text_field('') }}
|
||||
{% call field(border=False) %}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
|
||||
{{ stats_fields('sms', service['stats']) }}
|
||||
{% endcall %}
|
||||
|
||||
{% call row() %}
|
||||
|
||||
{% call field(border=False) %}
|
||||
|
||||
{% endcall %}
|
||||
{{ stats_fields('letter', service['stats']) }}
|
||||
|
||||
{% endcall %}
|
||||
|
||||
{% endcall %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
@@ -92,6 +92,12 @@
|
||||
{{ edit_field('Manage' if sms_sender_count else 'Change', url_for('.service_sms_senders', service_id=current_service.id)) }}
|
||||
{% endcall %}
|
||||
|
||||
{% call row() %}
|
||||
{{ text_field('Text messages start with service name') }}
|
||||
{{ boolean_field(prefix_sms_with_service_name) }}
|
||||
{{ edit_field('Change', url_for('.service_set_sms_prefix', service_id=current_service.id)) }}
|
||||
{% endcall %}
|
||||
|
||||
{% call row() %}
|
||||
{{ text_field('International text messages') }}
|
||||
{{ boolean_field('international_sms' in current_service.permissions) }}
|
||||
@@ -106,7 +112,7 @@
|
||||
|
||||
{% if can_receive_inbound %}
|
||||
{% call row() %}
|
||||
{{ text_field('API endpoint for received text messages') }}
|
||||
{{ text_field('Callback URL for received text messages') }}
|
||||
{{ optional_text_field(inbound_api_url) }}
|
||||
{{ edit_field('Change', url_for('.service_set_inbound_api', service_id=current_service.id)) }}
|
||||
{% endcall %}
|
||||
|
||||
@@ -3,27 +3,27 @@
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Inbound api
|
||||
Callback URL
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
<div class="grid-row">
|
||||
<div class="column-five-sixths">
|
||||
<h1 class="heading-large">API endpoint for received text messages</h1>
|
||||
<h1 class="heading-large">Callback URL for received text messages</h1>
|
||||
<p>
|
||||
This is the https url that the inbound SMS messages will be posted to
|
||||
and the bearer token used in the authorisation header of the request.
|
||||
Text messages you receive can be forwarded to your systems with our callback feature.
|
||||
See our <a href="{{ url_for('.callbacks') }}">documentation on the format of the callback</a>.
|
||||
</p>
|
||||
|
||||
<form method="post">
|
||||
{{ textbox(
|
||||
form.url,
|
||||
width='2-3',
|
||||
hint='Valid https url'
|
||||
hint='Valid https URL'
|
||||
) }}
|
||||
{{ textbox(
|
||||
form.bearer_token,
|
||||
width='1-4',
|
||||
width='2-3',
|
||||
hint='At least 10 characters'
|
||||
) }}
|
||||
{{ page_footer(
|
||||
@@ -35,4 +35,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/radios.html" import radios %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Text messages start with service name
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-large">Text messages start with service name</h1>
|
||||
<form method="post">
|
||||
{{ radios(form.enabled) }}
|
||||
{{ page_footer(
|
||||
button_text="Save",
|
||||
back_link=url_for('.service_settings', service_id=current_service.id),
|
||||
back_link_text='Back to settings'
|
||||
) }}
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
@@ -116,7 +116,7 @@
|
||||
<div class="grid-row bottom-gutter">
|
||||
<div class="column-half">
|
||||
<h3 class="visually-hidden">Services</h3>
|
||||
<div class="product-page-big-number">98</div>
|
||||
<div class="product-page-big-number">104</div>
|
||||
services
|
||||
</div>
|
||||
<div class="column-half">
|
||||
|
||||
Reference in New Issue
Block a user