├── .adr-dir ├── .codacy.yaml ├── .dockerignore ├── .env ├── .env.test ├── .github ├── dependabot.yml └── workflows │ └── pre-merge-checks.yml ├── .gitignore ├── .rspec ├── .rubocop.yml ├── .ruby-version ├── .scss-lint.yml ├── Dockerfile ├── Dockerfile.heroku ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── Procfile ├── README.md ├── Rakefile ├── app.json ├── app ├── assets │ ├── config │ │ └── manifest.js │ ├── images │ │ ├── .keep │ │ ├── govuk-verify-black.png │ │ ├── govuk-verify-black.svg │ │ ├── govuk-verify-horizontal.png │ │ ├── govuk-verify-horizontal.svg │ │ ├── govuk-verify-small-black-text-170px.png │ │ ├── govuk-verify-small-black-text-400X200.png │ │ ├── govuk-verify-small-black-text.png │ │ ├── govuk-verify-small-black-text.svg │ │ ├── govuk-verify.png │ │ ├── govuk-verify.svg │ │ └── loading.gif │ ├── javascripts │ │ ├── 00-cookies.js │ │ ├── ab_test_selector.js │ │ ├── analytics.js │ │ ├── application.js.erb │ │ ├── auto_submit_form.js │ │ ├── continue_to_idp.js │ │ ├── feedback.js │ │ ├── further_information.js │ │ ├── piwik_event_tracking.js │ │ ├── piwik_idp_picker_tracking.js │ │ ├── piwik_secure_cookie.js │ │ ├── validation.js │ │ ├── vendor │ │ │ ├── jquery.inputevent.js │ │ │ ├── jquery.validate.js │ │ │ └── jquery.validate.pattern.js │ │ └── will_it_work_for_me.js │ └── stylesheets │ │ ├── application.scss │ │ ├── helpers │ │ ├── _available-languages.scss │ │ ├── _feedback-link.scss │ │ ├── _js-show.scss │ │ ├── _meta-data.scss │ │ ├── _overrides.scss │ │ ├── _validation-message.scss │ │ └── _verify-logo.scss │ │ ├── pages │ │ ├── _choose-a-certified-company.scss │ │ ├── _company.scss │ │ ├── _config-provided-html.scss │ │ ├── _cookies.scss │ │ ├── _failed-uplift.scss │ │ ├── _feedback-landing.scss │ │ ├── _feedback.scss │ │ ├── _logos-container.scss │ │ ├── _privacy-notice.scss │ │ ├── _response-processing.scss │ │ ├── _select-phone.scss │ │ └── _slides.scss │ │ └── verify-frontend.scss ├── constraints │ ├── ab_test_constraint.rb │ ├── loa_match.rb │ └── select_route.rb ├── controllers │ ├── about_controller.rb │ ├── application_controller.rb │ ├── authn_request_controller.rb │ ├── authn_response_controller.rb │ ├── cancelled_registration_controller.rb │ ├── choose_a_certified_company_controller.rb │ ├── completed_registration_controller.rb │ ├── concerns │ │ └── .keep │ ├── confirm_your_identity_controller.rb │ ├── confirmation_controller.rb │ ├── errors_controller.rb │ ├── failed_registration_controller.rb │ ├── failed_sign_in_controller.rb │ ├── failed_uplift_controller.rb │ ├── feedback_controller.rb │ ├── feedback_landing_controller.rb │ ├── feedback_sent_controller.rb │ ├── further_information_controller.rb │ ├── hint_controller.rb │ ├── idp_selection_controller.rb │ ├── initiate_journey_controller.rb │ ├── metadata_controller.rb │ ├── other_ways_to_access_service_controller.rb │ ├── partials │ │ ├── analytics_cookie_partial_controller.rb │ │ ├── analytics_partial_controller.rb │ │ ├── journey_hinting_partial_controller.rb │ │ ├── retrieve_federation_data_partial_controller.rb │ │ ├── transactions_partial_controller.rb │ │ ├── user_cookies_partial_controller.rb │ │ ├── user_errors_partial_controller.rb │ │ ├── user_session_partial_controller.rb │ │ └── viewable_idp_partial_controller.rb │ ├── paused_registration_controller.rb │ ├── prove_identity_controller.rb │ ├── publish_hub_config_controller.rb │ ├── redirect_to_service_controller.rb │ ├── response_processing_controller.rb │ ├── saml_controller.rb │ ├── service_status_controller.rb │ ├── sign_in_controller.rb │ ├── single_idp_journey_controller.rb │ ├── start_controller.rb │ ├── static_controller.rb │ ├── test_analytics_controller.rb │ ├── test_csp_reporter_controller.rb │ ├── test_journey_hint_cookie_controller.rb │ ├── test_saml_controller.rb │ ├── test_single_idp_journey_controller.rb │ ├── test_throttling_cookie_controller.rb │ └── will_it_work_for_me_controller.rb ├── helpers │ └── application_helper.rb ├── models │ ├── .keep │ ├── ab_test │ │ ├── ab_test.rb │ │ └── experiment.rb │ ├── analytics │ │ └── federation_reporter.rb │ ├── concerns │ │ └── .keep │ ├── config_endpoints.rb │ ├── config_proxy.rb │ ├── cookies │ │ └── cookies.rb │ ├── cycle_three │ │ ├── cycle_three_attribute.rb │ │ └── cycle_three_attribute_generator.rb │ ├── cycle_three_attribute_response.rb │ ├── display │ │ ├── cycle_three_display_data.rb │ │ ├── display_data.rb │ │ ├── identity_provider_display_decorator.rb │ │ ├── idp_display_data.rb │ │ ├── not_viewable_identity_provider.rb │ │ ├── not_viewable_scheme.rb │ │ ├── repository_factory.rb │ │ ├── rp │ │ │ ├── display_data_correlator.rb │ │ │ ├── service_list_data_correlator.rb │ │ │ ├── transaction_filter.rb │ │ │ └── transaction_taxon_correlator.rb │ │ ├── rp_display_data.rb │ │ ├── rp_display_repository.rb │ │ └── viewable_identity_provider.rb │ ├── evidence.rb │ ├── feedback_form.rb │ ├── feedback_service.rb │ ├── feedback_source_mapper.rb │ ├── further_information_service.rb │ ├── identity_provider.rb │ ├── identity_provider_request.rb │ ├── idp_authn_response.rb │ ├── idp_list_response.rb │ ├── journey_type.rb │ ├── matching_outcome_response.rb │ ├── metadata_client.rb │ ├── outbound_saml_message.rb │ ├── policy_endpoints.rb │ ├── policy_proxy.rb │ ├── publish_hub_config_client.rb │ ├── response_for_rp.rb │ ├── saml_proxy_api.rb │ ├── saml_proxy_endpoints.rb │ ├── select_idp_response.rb │ ├── selected_provider_data.rb │ ├── session_validator.rb │ ├── session_validator │ │ ├── cookie_size_validator.rb │ │ ├── idp_presence.rb │ │ ├── missing_cookies_validator.rb │ │ ├── no_cookies_validator.rb │ │ ├── requested_loa_validator.rb │ │ ├── session_id_validator.rb │ │ ├── session_start_time_validator.rb │ │ ├── successful_validation.rb │ │ ├── transaction_entity_id_presence.rb │ │ ├── transaction_simple_id_presence.rb │ │ ├── validation.rb │ │ └── validation_failure.rb │ ├── sign_in_process_details_response.rb │ ├── start_form.rb │ ├── transaction_response.rb │ ├── transaction_translation_response.rb │ └── will_it_work_for_me_form.rb ├── services │ └── rp_translation_service.rb └── views │ ├── about │ ├── choosing_a_company.html.erb │ ├── documents.html.erb │ ├── how_verify_works.html.erb │ └── prove_your_identity_another_way.html.erb │ ├── cancelled_registration │ └── cancelled_registration.html.erb │ ├── choose_a_certified_company │ ├── _idp_option.html.erb │ ├── about.html.erb │ └── choose_a_certified_company.html.erb │ ├── completed_registration │ └── index.erb │ ├── confirm_your_identity │ └── index.html.erb │ ├── confirmation │ └── confirmation.html.erb │ ├── errors │ ├── 404.html.erb │ ├── no_cookies.html.erb │ ├── session_error.html.erb │ ├── session_timeout.html.erb │ └── something_went_wrong.html.erb │ ├── failed_registration │ ├── custom_failed_registration.html.erb │ └── failed_registration.html.erb │ ├── failed_sign_in │ └── idp.html.erb │ ├── failed_uplift │ └── index.html.erb │ ├── feedback │ ├── disabled.html.erb │ ├── index.html.erb │ └── sent.html.erb │ ├── feedback_landing │ └── index.html.erb │ ├── feedback_sent │ └── index.html.erb │ ├── further_information │ ├── index.html.erb │ └── timeout.html.erb │ ├── layouts │ ├── application.html.erb │ ├── main_layout.html.erb │ ├── slides.html.erb │ └── test.html.erb │ ├── other_ways_to_access_service │ └── index.html.erb │ ├── paused_registration │ ├── from_resume_link.html.erb │ ├── idp_no_longer_providing_registrations.html.erb │ ├── resume.html.erb │ ├── with_user_session.html.erb │ └── without_user_session.html.erb │ ├── prove_identity │ └── prove_identity.html.erb │ ├── redirect_to_service │ └── redirect_to_service.html.erb │ ├── response_processing │ ├── index.html.erb │ └── matching_error.html.erb │ ├── shared │ ├── _available_languages.html.erb │ ├── _continue_to_idp_form.html.erb │ ├── _feedback_landing_link.html.erb │ ├── _feedback_link.html.erb │ ├── _form-errors.html.erb │ ├── _ga.html.erb │ ├── _idp_list.erb │ ├── _logos_container.html.erb │ ├── _other_ways.html.erb │ ├── _piwik.html.erb │ ├── _transaction_list.html.erb │ ├── _transaction_list_prefer_headless_start.html.erb │ ├── redirect_to_idp.html.erb │ └── sign_in_hint.html.erb │ ├── sign_in │ ├── _disconnected_idp_list.erb │ ├── _disconnected_suggested_idp.erb │ ├── _unavailable_idp_list.erb │ ├── index.html.erb │ └── warn_idp_disconnecting.html.erb │ ├── single_idp_journey │ ├── continue_to_your_idp.html.erb │ └── rp_start_page.html.erb │ ├── start │ └── start.html.erb │ ├── static │ ├── accessibility.cy.html.erb │ ├── accessibility.en.html.erb │ ├── cookies.cy.html.erb │ ├── cookies.en.html.erb │ ├── forgot_company.cy.html.erb │ ├── forgot_company.en.html.erb │ ├── privacy_notice.cy.html.erb │ ├── privacy_notice.en.html.erb │ └── verify_services.html.erb │ ├── test_journey_hint_cookie │ └── index.html.erb │ ├── test_saml │ ├── idp_request.html.erb │ └── index.html.erb │ ├── test_single_idp_journey │ └── index.html.erb │ └── will_it_work_for_me │ ├── index.html.erb │ ├── may_not_work_if_you_live_overseas.html.erb │ ├── why_might_this_not_work_for_me.html.erb │ └── will_not_work_without_uk_address.html.erb ├── architecture-decisions ├── 0001-record-architecture-decisions.md ├── 0002-implement-ab-testing.md ├── 0003-new-ab-testing-approach.md └── 0004-journey-hint-tracking-cookie.md ├── bin ├── bundle ├── cli.sh ├── rails ├── rake ├── setup └── spring ├── conf.d └── zdd_latch.conf ├── config.ru ├── config ├── application.rb ├── boot.rb ├── environment.rb ├── environments │ ├── development.rb │ ├── production.rb │ └── test.rb ├── initializers │ ├── 00_logging.rb │ ├── 10_configuration.rb │ ├── 20_localisation.rb │ ├── 30_api_proxies.rb │ ├── 40_federation.rb │ ├── ab_tests.rb │ ├── analytics.rb │ ├── assets.rb │ ├── backtrace_silencers.rb │ ├── cookies_serializer.rb │ ├── feedback.rb │ ├── feedback_source_mapper.rb │ ├── filter_parameter_logging.rb │ ├── http.rb │ ├── inflections.rb │ ├── metadata_client.rb │ ├── metrics.rb │ ├── middleware_service_status_filter.rb │ ├── middleware_store_session_id.rb │ ├── mime_types.rb │ ├── prometheus.rb │ ├── publish_hub_config_client.rb │ ├── session_store.rb │ ├── session_validator.rb │ ├── throttling.rb │ ├── verify_form_builder.rb │ └── wrap_parameters.rb ├── locales │ ├── cy.yml │ └── en.yml ├── main_routes.rb ├── puma.rb ├── routes.rb └── secrets.yml ├── db └── seeds.rb ├── heroku-startup.sh ├── heroku.yml ├── kill-service.sh ├── lib ├── analytics.rb ├── analytics │ ├── custom_variable.rb │ ├── null_reporter.rb │ ├── piwik_client.rb │ └── reporter.rb ├── api.rb ├── api │ ├── client.rb │ ├── error.rb │ ├── hub_response_handler.rb │ ├── response.rb │ ├── session_error.rb │ ├── session_timeout_error.rb │ └── upstream_error.rb ├── assets │ └── .keep ├── configuration.rb ├── cookie_names.rb ├── errors │ └── warning_level_error.rb ├── feedback │ └── dummy_zendesk_client.rb ├── google_analytics.rb ├── loading_cache.rb ├── metrics.rb ├── metrics │ ├── api_request_reporter.rb │ ├── controller_action_reporter.rb │ ├── event_subscriber.rb │ └── response_status_reporter.rb ├── node_modules │ ├── .yarn-integrity │ └── govuk-frontend │ │ ├── README.md │ │ ├── govuk-prototype-kit.config.json │ │ ├── govuk │ │ ├── _base.scss │ │ ├── all-ie8.scss │ │ ├── all.js │ │ ├── all.scss │ │ ├── assets │ │ │ ├── fonts │ │ │ │ ├── bold-affa96571d-v2.woff │ │ │ │ ├── bold-b542beb274-v2.woff2 │ │ │ │ ├── light-94a07e06a1-v2.woff2 │ │ │ │ └── light-f591b13f7d-v2.woff │ │ │ └── images │ │ │ │ ├── favicon.ico │ │ │ │ ├── govuk-apple-touch-icon-152x152.png │ │ │ │ ├── govuk-apple-touch-icon-167x167.png │ │ │ │ ├── govuk-apple-touch-icon-180x180.png │ │ │ │ ├── govuk-apple-touch-icon.png │ │ │ │ ├── govuk-crest-2x.png │ │ │ │ ├── govuk-crest.png │ │ │ │ ├── govuk-logotype-crown.png │ │ │ │ ├── govuk-mask-icon.svg │ │ │ │ └── govuk-opengraph-image.png │ │ ├── common.js │ │ ├── components │ │ │ ├── _all.scss │ │ │ ├── accordion │ │ │ │ ├── README.md │ │ │ │ ├── _accordion.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── accordion.js │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── back-link │ │ │ │ ├── README.md │ │ │ │ ├── _back-link.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── breadcrumbs │ │ │ │ ├── README.md │ │ │ │ ├── _breadcrumbs.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── button │ │ │ │ ├── README.md │ │ │ │ ├── _button.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── button.js │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── character-count │ │ │ │ ├── README.md │ │ │ │ ├── _character-count.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── character-count.js │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── checkboxes │ │ │ │ ├── README.md │ │ │ │ ├── _checkboxes.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── checkboxes.js │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── cookie-banner │ │ │ │ ├── README.md │ │ │ │ ├── _cookie-banner.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── date-input │ │ │ │ ├── README.md │ │ │ │ ├── _date-input.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── details │ │ │ │ ├── README.md │ │ │ │ ├── _details.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── details.js │ │ │ │ ├── fixtures.json │ │ │ │ ├── implementation.md │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── error-message │ │ │ │ ├── README.md │ │ │ │ ├── _error-message.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── error-summary │ │ │ │ ├── README.md │ │ │ │ ├── _error-summary.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── error-summary.js │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── fieldset │ │ │ │ ├── README.md │ │ │ │ ├── _fieldset.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── file-upload │ │ │ │ ├── README.md │ │ │ │ ├── _file-upload.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── footer │ │ │ │ ├── README.md │ │ │ │ ├── _footer.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── header │ │ │ │ ├── README.md │ │ │ │ ├── _header.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── header.js │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── hint │ │ │ │ ├── README.md │ │ │ │ ├── _hint.scss │ │ │ │ ├── _index.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── input │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _input.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── inset-text │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _inset-text.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── label │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _label.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── notification-banner │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _notification-banner.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ ├── notification-banner.js │ │ │ │ └── template.njk │ │ │ ├── panel │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _panel.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── phase-banner │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _phase-banner.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── radios │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _radios.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ ├── radios.js │ │ │ │ └── template.njk │ │ │ ├── select │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _select.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── skip-link │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _skip-link.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── summary-list │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _summary-list.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── table │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _table.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── tabs │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _tabs.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ ├── tabs.js │ │ │ │ └── template.njk │ │ │ ├── tag │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _tag.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ ├── textarea │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _textarea.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ │ └── warning-text │ │ │ │ ├── README.md │ │ │ │ ├── _index.scss │ │ │ │ ├── _warning-text.scss │ │ │ │ ├── fixtures.json │ │ │ │ ├── macro-options.json │ │ │ │ ├── macro.njk │ │ │ │ └── template.njk │ │ ├── core │ │ │ ├── _all.scss │ │ │ ├── _global-styles.scss │ │ │ ├── _links.scss │ │ │ ├── _lists.scss │ │ │ ├── _section-break.scss │ │ │ ├── _template.scss │ │ │ └── _typography.scss │ │ ├── helpers │ │ │ ├── _all.scss │ │ │ ├── _clearfix.scss │ │ │ ├── _colour.scss │ │ │ ├── _device-pixels.scss │ │ │ ├── _focused.scss │ │ │ ├── _font-faces.scss │ │ │ ├── _grid.scss │ │ │ ├── _links.scss │ │ │ ├── _media-queries.scss │ │ │ ├── _shape-arrow.scss │ │ │ ├── _spacing.scss │ │ │ ├── _typography.scss │ │ │ └── _visually-hidden.scss │ │ ├── objects │ │ │ ├── _all.scss │ │ │ ├── _button-group.scss │ │ │ ├── _form-group.scss │ │ │ ├── _grid.scss │ │ │ ├── _main-wrapper.scss │ │ │ └── _width-container.scss │ │ ├── overrides │ │ │ ├── _all.scss │ │ │ ├── _display.scss │ │ │ ├── _spacing.scss │ │ │ ├── _text-align.scss │ │ │ ├── _typography.scss │ │ │ └── _width.scss │ │ ├── settings │ │ │ ├── _all.scss │ │ │ ├── _assets.scss │ │ │ ├── _colours-applied.scss │ │ │ ├── _colours-organisations.scss │ │ │ ├── _colours-palette.scss │ │ │ ├── _compatibility.scss │ │ │ ├── _global-styles.scss │ │ │ ├── _ie8.scss │ │ │ ├── _links.scss │ │ │ ├── _measurements.scss │ │ │ ├── _media-queries.scss │ │ │ ├── _spacing.scss │ │ │ ├── _typography-font-families.scss │ │ │ ├── _typography-font.scss │ │ │ └── _typography-responsive.scss │ │ ├── template.njk │ │ ├── tools │ │ │ ├── _all.scss │ │ │ ├── _compatibility.scss │ │ │ ├── _exports.scss │ │ │ ├── _font-url.scss │ │ │ ├── _ie8.scss │ │ │ ├── _iff.scss │ │ │ ├── _image-url.scss │ │ │ ├── _px-to-em.scss │ │ │ └── _px-to-rem.scss │ │ ├── utilities │ │ │ ├── _all.scss │ │ │ ├── _clearfix.scss │ │ │ └── _visually-hidden.scss │ │ └── vendor │ │ │ ├── _sass-mq.scss │ │ │ └── polyfills │ │ │ ├── DOMTokenList.js │ │ │ ├── Document.js │ │ │ ├── Element.js │ │ │ ├── Element │ │ │ └── prototype │ │ │ │ ├── classList.js │ │ │ │ ├── closest.js │ │ │ │ ├── matches.js │ │ │ │ ├── nextElementSibling.js │ │ │ │ └── previousElementSibling.js │ │ │ ├── Event.js │ │ │ ├── Function │ │ │ └── prototype │ │ │ │ └── bind.js │ │ │ ├── Object │ │ │ └── defineProperty.js │ │ │ └── Window.js │ │ └── package.json ├── originating_ip_store.rb ├── package-lock.json ├── package.json ├── piwik.rb ├── pooling_client.rb ├── prometheus.rb ├── prometheus │ ├── api_request_reporter.rb │ ├── controller_action_reporter.rb │ ├── event_subscriber.rb │ └── session_timeout_reporter.rb ├── raven │ └── processor │ │ └── cookies.rb ├── redirect_with_see_other.rb ├── service_status.rb ├── service_status_filter.rb ├── ssl_context_factory.rb ├── store_session_id.rb ├── support │ └── raven │ │ └── logger.rb ├── tasks │ ├── .keep │ ├── copy_govuk_dependencies.rake │ ├── lint.rake │ └── zdd.rake ├── verify_form_builder.rb ├── yaml_loader.rb ├── yarn.lock └── zendesk_client.rb ├── log └── .keep ├── packaging ├── postinst.sh └── postrm.sh ├── pre-commit-docker.sh ├── pre-commit.sh ├── public ├── 422.html ├── 500.html ├── favicon.ico ├── get_hint.js ├── googlee6ac195426fef3bb.html ├── robots.txt └── stub-logos │ ├── stub-idp-demo-one.png │ ├── stub-idp-demo-two.png │ ├── stub-idp-disconnected.png │ ├── stub-idp-four.png │ ├── stub-idp-loa1.png │ ├── stub-idp-no-docs.png │ ├── stub-idp-one.png │ ├── stub-idp-three.png │ ├── stub-idp-two.png │ ├── stub-idp-unavailable.png │ ├── stub-idp-zero.png │ └── white │ ├── barclays.png │ ├── digidentity-pre.png │ ├── digidentity.png │ ├── experian.png │ ├── headless-idp.png │ ├── post-office-pre.png │ ├── post-office-stub.png │ ├── post-office.png │ ├── secureidentity.png │ ├── stub-idp-demo-one.png │ ├── stub-idp-demo-three.png │ ├── stub-idp-demo-two.png │ ├── stub-idp-disconnected.png │ ├── stub-idp-four.png │ ├── stub-idp-loa1.png │ ├── stub-idp-no-docs.png │ ├── stub-idp-one.png │ ├── stub-idp-three.png │ ├── stub-idp-two.png │ ├── stub-idp-unavailable.png │ └── stub-idp-zero.png ├── scripts └── deploy.sh ├── spec ├── api_test_helper.rb ├── constraints │ ├── ab_test_constraint_spec.rb │ ├── loa_match_spec.rb │ └── select_route_spec.rb ├── controller_helper.rb ├── controllers │ ├── about_controller_spec.rb │ ├── authn_request_controller_spec.rb │ ├── authn_response_controller_spec.rb │ ├── cancelled_registration_controller_spec.rb │ ├── choose_a_certified_company_controller_spec.rb │ ├── completed_registration_controller_spec.rb │ ├── confirmation_controller_spec.rb │ ├── failed_registration_controller_spec.rb │ ├── feedback_controller_spec.rb │ ├── further_information_controller_spec.rb │ ├── hint_controller_spec.rb │ ├── initiate_journey_controller_spec.rb │ ├── metadata_controller_spec.rb │ ├── paused_registration_controller_spec.rb │ ├── prove_identity_controller_spec.rb │ ├── publish_hub_config_controller_spec.rb │ ├── response_processing_controller_spec.rb │ ├── sign_in_controller_spec.rb │ ├── single_idp_journey_controller_spec.rb │ ├── start_controller_spec.rb │ └── will_it_work_for_me_controller_spec.rb ├── feature_helper.rb ├── features │ ├── idp_selections_reported_to_piwik_spec.rb │ ├── localisation_set_from_different_sources_spec.rb │ ├── redirects_with_journey_hint_authn_request_spec.rb │ ├── redirects_with_see_other_spec.rb │ ├── server_sends_analytics_spec.rb │ ├── service_retrieves_metadata_spec.rb │ ├── service_set_unavailable_spec.rb │ ├── user_encounters_a_404_spec.rb │ ├── user_encounters_error_page_spec.rb │ ├── user_gets_soft_session_timeout_page_spec.rb │ ├── user_sends_authn_request_spec.rb │ ├── user_sends_authn_response_spec.rb │ ├── user_submits_feedback_page_spec.rb │ ├── user_submits_start_page_form_spec.rb │ ├── user_visits_about_choosing_a_company_page_spec.rb │ ├── user_visits_about_documents_spec.rb │ ├── user_visits_about_page_spec.rb │ ├── user_visits_accessibility_page_spec.rb │ ├── user_visits_an_idp_emailed_link_to_paused_page_spec.rb │ ├── user_visits_cancelled_registration_page_spec.rb │ ├── user_visits_choose_a_certified_company_about_idp_page_spec.rb │ ├── user_visits_choose_a_certified_company_page_spec.rb │ ├── user_visits_confirm_your_identity_page_spec.rb │ ├── user_visits_confirmation_page_spec.rb │ ├── user_visits_continue_to_your_idp_page_spec.rb │ ├── user_visits_cookies_page_spec.rb │ ├── user_visits_failed_registration_page_spec.rb │ ├── user_visits_failed_sign_in_page_spec.rb │ ├── user_visits_feedback_page_spec.rb │ ├── user_visits_further_information_page_spec.rb │ ├── user_visits_humanstxt_spec.rb │ ├── user_visits_idp_warning_page_spec.rb │ ├── user_visits_may_not_work_if_you_live_overseas_spec.rb │ ├── user_visits_other_ways_to_access_page_spec.rb │ ├── user_visits_paused_page_spec.rb │ ├── user_visits_privacy_notice_page_spec.rb │ ├── user_visits_prove_your_identity_another_way_page_spec.rb │ ├── user_visits_prove_your_identity_page_spec.rb │ ├── user_visits_redirect_to_service_page_spec.rb │ ├── user_visits_response_processing_page_spec.rb │ ├── user_visits_resume_registration_page_spec.rb │ ├── user_visits_rp_single_idp_start_page_spec.rb │ ├── user_visits_sign_in_page_spec.rb │ ├── user_visits_start_page_spec.rb │ ├── user_visits_verify_services_picker_page_spec.rb │ ├── user_visits_why_might_this_not_work_for_me_page_spec.rb │ ├── user_visits_will_it_work_for_me_page_spec.rb │ ├── user_visits_will_not_work_without_uk_address_page_spec.rb │ └── users_browser_sends_client_side_analytics_spec.rb ├── helpers │ └── application_helper_spec.rb ├── javascripts │ ├── ab_test_selector_spec.js │ ├── auto_submit_form_spec.js │ ├── continue_to_idp_spec.js │ ├── feedback_spec.js │ ├── further_information_spec.js │ ├── mock-ajax.js │ ├── piwik_event_tracking_spec.js │ ├── startpage_spec.js │ ├── support │ │ └── jasmine.yml │ └── will_it_work_for_me_spec.js ├── lib │ ├── analytics │ │ ├── piwik_client_spec.rb │ │ └── reporter_spec.rb │ ├── api │ │ ├── client_spec.rb │ │ └── hub_response_handler_spec.rb │ ├── configuration_spec.rb │ ├── google_analytics_spec.rb │ ├── loading_cache_spec.rb │ ├── metrics │ │ ├── api_request_reporter_spec.rb │ │ ├── controller_action_reporter_spec.rb │ │ ├── event_subscriber_spec.rb │ │ └── response_status_reporter_spec.rb │ ├── originating_ip_store_spec.rb │ ├── piwik_spec.rb │ ├── prometheus │ │ ├── api_request_reporter_spec.rb │ │ ├── controller_action_reporter_spec.rb │ │ ├── event_subscriber_spec.rb │ │ └── session_timeout_reporter_spec.rb │ ├── service_status_spec.rb │ ├── store_session_id_spec.rb │ ├── support │ │ └── raven │ │ │ └── logger_spec.rb │ ├── verify_form_builder_spec.rb │ ├── yaml_loader_spec.rb │ └── zendesk_client_spec.rb ├── logger_helper.rb ├── mock_piwik_middleware.rb ├── models │ ├── ab_test │ │ ├── ab_test_spec.rb │ │ └── experiment_spec.rb │ ├── analytics │ │ └── federation_reporter_spec.rb │ ├── config_proxy_spec.rb │ ├── cycle_three │ │ ├── cycle_three_attribute_generator_spec.rb │ │ └── cycle_three_attribute_spec.rb │ ├── cycle_three_attribute_response_spec.rb │ ├── display │ │ ├── cycle_three_display_data_spec.rb │ │ ├── display_data_spec.rb │ │ ├── identity_provider_display_decorator_spec.rb │ │ ├── idp_display_data_spec.rb │ │ ├── rp │ │ │ ├── display_data_correlator_spec.rb │ │ │ ├── service_list_data_correlator_spec.rb │ │ │ ├── transaction_filter_spec.rb │ │ │ └── transaction_taxon_correlator_spec.rb │ │ ├── rp_display_data_spec.rb │ │ └── rp_display_repository_spec.rb │ ├── feedback_form_spec.rb │ ├── feedback_service_spec.rb │ ├── feedback_source_mapper_spec.rb │ ├── further_information_service_spec.rb │ ├── identity_provider_request_spec.rb │ ├── identity_provider_spec.rb │ ├── idp_list_response_spec.rb │ ├── matching_outcome_response_spec.rb │ ├── metadata_client_spec.rb │ ├── outbound_saml_message_spec.rb │ ├── policy_proxy_spec.rb │ ├── publish_hub_config_client_spec.rb │ ├── saml_proxy_api_spec.rb │ ├── select_idp_response_spec.rb │ ├── session_validator_spec.rb │ └── will_it_work_for_me_form_spec.rb ├── piwik_test_helper.rb ├── rails_helper.rb ├── services │ └── rp_translation_service_spec.rb ├── sign_in_helper.rb ├── spec_helper.rb └── support │ ├── authn_request_redirect_examples.rb │ ├── authn_response_examples.rb │ ├── cookie_matchers.rb │ ├── display_data_examples.rb │ ├── list_size_matcher.rb │ ├── model_examples.rb │ ├── response_processing_examples.rb │ ├── select_idp_examples.rb │ ├── tracking_cookie_examples.rb │ └── will_it_work_for_me_examples.rb ├── startup.sh ├── stub ├── ab_test.yml ├── api │ ├── Gemfile │ ├── Gemfile.lock │ ├── stub_api.rb │ ├── stub_api_conf.ru │ └── stub_api_spec.rb ├── attributes │ ├── DrivingLicenceNumber.yml │ ├── NationalInsuranceNumber.yml │ └── NullableAttribute.yml ├── locales │ ├── cycle3 │ │ ├── DrivingLicenceNumber.yml │ │ ├── NationalInsuranceNumber.yml │ │ └── NullableAttribute.yml │ ├── idps │ │ ├── stub-idp-demo-one.yml │ │ ├── stub-idp-demo-two.yml │ │ ├── stub-idp-disconnected.yml │ │ ├── stub-idp-four.yml │ │ ├── stub-idp-loa1.yml │ │ ├── stub-idp-no-docs.yml │ │ ├── stub-idp-one.yml │ │ ├── stub-idp-three.yml │ │ ├── stub-idp-two.yml │ │ ├── stub-idp-unavailable.yml │ │ └── stub-idp-zero.yml │ └── rps │ │ └── test-rp-non-eidas.yml ├── relying_parties.yml └── throttling.yml ├── upstart └── front.conf └── vendor └── assets ├── javascripts ├── .keep ├── ga.js └── piwik.js └── stylesheets └── .keep /.adr-dir: -------------------------------------------------------------------------------- 1 | architecture-decisions 2 | -------------------------------------------------------------------------------- /.codacy.yaml: -------------------------------------------------------------------------------- 1 | exclude_paths: 2 | - 'lib/node_modules/**/* -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | tmp 2 | log 3 | -------------------------------------------------------------------------------- /.env.test: -------------------------------------------------------------------------------- 1 | CONFIG_API_HOST=http://api.com:50240 2 | SAML_PROXY_HOST=http://api.com:50220 3 | POLICY_HOST=http://api.com:50110 4 | METRICS_ENABLED=false 5 | 6 | PUBLIC_PIWIK_HOST=http://localhost:4242/piwik.php 7 | INTERNAL_PIWIK_HOST=http://localhost:4242/piwik.php 8 | PIWIK_SITE_ID=5 9 | 10 | CROSS_GOV_GOOGLE_ANALYTICS_TRACKER_ID=UA-XXXXX-Y 11 | CROSS_GOV_GOOGLE_ANALYTICS_DOMAIN_LIST=www.gov.uk 12 | 13 | PUBLISH_HUB_CONFIG_ENABLED=true 14 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "bundler" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "daily" 12 | open-pull-requests-limit: 100 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files. 2 | # 3 | # If you find yourself ignoring temporary files generated by your text editor 4 | # or operating system, you probably want to add a global ignore instead: 5 | # git config --global core.excludesfile '~/.gitignore_global' 6 | 7 | # Ignore bundler config. 8 | **/.bundle 9 | 10 | # Ignore all logfiles and tempfiles. 11 | /log/* 12 | !/log/.keep 13 | /tmp 14 | .byebug_history 15 | .gems 16 | .idea 17 | *.swp 18 | local.env 19 | 20 | 21 | verify-frontend.iml 22 | 23 | .DS_Store 24 | /spec/pacts 25 | 26 | # Codacy coverage results 27 | /coverage/ 28 | 29 | *~ 30 | \#*# 31 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.6 2 | -------------------------------------------------------------------------------- /.scss-lint.yml: -------------------------------------------------------------------------------- 1 | plugin_gems: ['scss_lint-govuk'] -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | front: bundle exec puma 2 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('../config/application', __FILE__) 5 | require 'fileutils' 6 | 7 | Rails.application.load_tasks 8 | 9 | task spec: ['lint:ruby', 'lint:sass'] 10 | task default: [:spec, 'jasmine:ci'] -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link application.css 2 | //= link_tree ../../../lib/node_modules/govuk-frontend/govuk/assets/images 3 | //= link_tree ../../../lib/node_modules/govuk-frontend/govuk/assets/fonts 4 | //= link_tree ../images 5 | //= link_directory ../javascripts .js -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/assets/images/.keep -------------------------------------------------------------------------------- /app/assets/images/govuk-verify-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/assets/images/govuk-verify-black.png -------------------------------------------------------------------------------- /app/assets/images/govuk-verify-horizontal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/assets/images/govuk-verify-horizontal.png -------------------------------------------------------------------------------- /app/assets/images/govuk-verify-small-black-text-170px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/assets/images/govuk-verify-small-black-text-170px.png -------------------------------------------------------------------------------- /app/assets/images/govuk-verify-small-black-text-400X200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/assets/images/govuk-verify-small-black-text-400X200.png -------------------------------------------------------------------------------- /app/assets/images/govuk-verify-small-black-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/assets/images/govuk-verify-small-black-text.png -------------------------------------------------------------------------------- /app/assets/images/govuk-verify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/assets/images/govuk-verify.png -------------------------------------------------------------------------------- /app/assets/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/assets/images/loading.gif -------------------------------------------------------------------------------- /app/assets/javascripts/auto_submit_form.js: -------------------------------------------------------------------------------- 1 | (function(global) { 2 | "use strict"; 3 | var GOVUK = global.GOVUK || {}; 4 | var $ = global.jQuery; 5 | 6 | GOVUK.autoSubmitForm = { 7 | attach: function () { 8 | // Using button.click() rather than form.submit() due to Google Analytic cross domain tracking code that can only 9 | // execute if the submit button is clicked. 10 | $("form.js-auto-submit #continue-button").click(); 11 | } 12 | }; 13 | 14 | global.GOVUK = GOVUK; 15 | })(window); 16 | -------------------------------------------------------------------------------- /app/assets/javascripts/further_information.js: -------------------------------------------------------------------------------- 1 | (function(global) { 2 | "use strict"; 3 | var GOVUK = global.GOVUK || {}; 4 | var $ = global.jQuery; 5 | 6 | GOVUK.furtherInformation = { 7 | init: function () { 8 | this.$form = $('#further-information'); 9 | this.$form.validate(); 10 | } 11 | }; 12 | 13 | global.GOVUK = GOVUK; 14 | })(window); 15 | -------------------------------------------------------------------------------- /app/assets/javascripts/piwik_secure_cookie.js: -------------------------------------------------------------------------------- 1 | (function(global){ 2 | global.GOVUK.piwikSecureCookie = { 3 | init: function() { 4 | _paq.push(['setSecureCookie', global.location.protocol === 'https:']); 5 | } 6 | } 7 | })(window); 8 | -------------------------------------------------------------------------------- /app/assets/javascripts/vendor/jquery.validate.pattern.js: -------------------------------------------------------------------------------- 1 | // From https://github.com/jzaefferer/jquery-validation/blob/38310a/src/additional/pattern.js 2 | /** 3 | * Return true if the field value matches the given format RegExp 4 | * 5 | * @example $.validator.methods.pattern("AR1004",element,/^AR\d{4}$/) 6 | * @result true 7 | * 8 | * @example $.validator.methods.pattern("BR1004",element,/^AR\d{4}$/) 9 | * @result false 10 | * 11 | * @name $.validator.methods.pattern 12 | * @type Boolean 13 | * @cat Plugins/Validate/Methods 14 | */ 15 | $.validator.addMethod( "pattern", function( value, element, param ) { 16 | if ( this.optional( element ) ) { 17 | return true; 18 | } 19 | if ( typeof param === "string" ) { 20 | param = new RegExp( "^(?:" + param + ")$" ); 21 | } 22 | return param.test( value ); 23 | }, "Invalid format." ); -------------------------------------------------------------------------------- /app/assets/stylesheets/helpers/_feedback-link.scss: -------------------------------------------------------------------------------- 1 | .feedback-link { 2 | margin-top: $govuk-gutter; 3 | } 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/helpers/_js-show.scss: -------------------------------------------------------------------------------- 1 | .js-show { 2 | display: none; 3 | } 4 | 5 | .js-enabled .js-show { 6 | display: block; 7 | } 8 | -------------------------------------------------------------------------------- /app/assets/stylesheets/helpers/_meta-data.scss: -------------------------------------------------------------------------------- 1 | .meta-data { 2 | @include govuk-font(16); 3 | color: $govuk-secondary-text-colour; 4 | 5 | p { 6 | @include govuk-font(16); 7 | text-align: left; 8 | color: $govuk-secondary-text-colour; 9 | 10 | a { 11 | color: $govuk-secondary-text-colour; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/assets/stylesheets/helpers/_overrides.scss: -------------------------------------------------------------------------------- 1 | // scss-lint:disable IdSelector,ColorVariable 2 | // WCAG 2.1 contrast requirements (can be removed once migrated to GOV.UK Frontend) 3 | #footer, 4 | #footer .footer-wrapper, 5 | #footer .footer-meta { 6 | color: #0b0c0c !important; 7 | background: #f3f2f1 !important; 8 | } 9 | -------------------------------------------------------------------------------- /app/assets/stylesheets/helpers/_validation-message.scss: -------------------------------------------------------------------------------- 1 | // Error messages 2 | .validation-message { 3 | padding-top: 15px; 4 | padding-bottom: 15px; 5 | color: $govuk-error-colour; 6 | font-weight: bold; 7 | 8 | .form-group-error, 9 | .form-group-error:focus { 10 | display: block; 11 | padding: 15px; 12 | margin: 15px 0; 13 | color: $govuk-error-colour; 14 | background: transparent; 15 | font-weight: bold; 16 | text-decoration: none; 17 | } 18 | } 19 | 20 | 21 | // Fields that were hidden by JS but marked 22 | // as validation errors should always be visible: 23 | .js-hidden.form-group-error { 24 | display: block; 25 | visibility: visible; 26 | } 27 | -------------------------------------------------------------------------------- /app/assets/stylesheets/helpers/_verify-logo.scss: -------------------------------------------------------------------------------- 1 | @include govuk-media-query($from: tablet) { 2 | main { 3 | position: relative; 4 | } 5 | 6 | .verify-logo-right { 7 | position: absolute; 8 | right: -20px; 9 | top: 80px; 10 | width: 33.33333%; 11 | } 12 | } 13 | 14 | .verify-logo-right { 15 | img { 16 | width: 171px; 17 | } 18 | } 19 | 20 | .slides, 21 | .no-right-hand-logo { 22 | ~ .verify-logo-right { 23 | display: none; 24 | } 25 | } 26 | 27 | .slides, 28 | .no-right-hand-logo { 29 | // use the "+" selector to support IE6 30 | + .feedback-link + .verify-logo-right, 31 | + .verify-logo-right { 32 | display: none; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pages/_choose-a-certified-company.scss: -------------------------------------------------------------------------------- 1 | .button { 2 | margin: 0 15px 15px 0; 3 | } 4 | 5 | .button-link { 6 | @include govuk-font(19); 7 | background: none; 8 | color: $govuk-link-colour; 9 | text-align: left; 10 | text-decoration: underline; 11 | border: 0; 12 | padding-left: 0; 13 | cursor: pointer; 14 | } 15 | 16 | .button-link:hover { 17 | color: $govuk-link-hover-colour; 18 | border-color: $govuk-link-hover-colour; 19 | } 20 | 21 | .subtitle { 22 | color: $govuk-secondary-text-colour; 23 | } 24 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pages/_config-provided-html.scss: -------------------------------------------------------------------------------- 1 | .other-ways-to-complete-transaction, 2 | .help-finding-further-information, 3 | .about-idp-content { 4 | strong { 5 | font-weight: bold; 6 | } 7 | 8 | // scss-lint:disable PlaceholderInExtend 9 | ul { 10 | @extend .govuk-list; 11 | @extend .govuk-list--bullet; 12 | } 13 | 14 | ol { 15 | @extend .govuk-list; 16 | @extend .govuk-list--number; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pages/_cookies.scss: -------------------------------------------------------------------------------- 1 | .cookies-table { 2 | td { 3 | vertical-align: top; 4 | width: 30%; 5 | } 6 | 7 | td+td { 8 | width: 45%; 9 | } 10 | 11 | td+td+td { 12 | width: 25%; 13 | } 14 | 15 | var { 16 | font-style: normal; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pages/_failed-uplift.scss: -------------------------------------------------------------------------------- 1 | .next-actions { 2 | margin: $govuk-gutter 0 $govuk-gutter-half; 3 | } 4 | 5 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pages/_feedback-landing.scss: -------------------------------------------------------------------------------- 1 | .contact-keyline { 2 | border-top: 1px solid govuk-colour("dark-grey"); 3 | padding-top: 3em; 4 | margin-top: 3em; 5 | } 6 | 7 | h2 { 8 | a { 9 | text-decoration: none; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pages/_feedback.scss: -------------------------------------------------------------------------------- 1 | .feedback-form { 2 | textarea { 3 | width: 100%; 4 | } 5 | 6 | .validation-message { 7 | border-left: 0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pages/_logos-container.scss: -------------------------------------------------------------------------------- 1 | .logos-container { 2 | margin-top: em(20, 16); 3 | 4 | .list-logos { 5 | 6 | li { 7 | padding: 0 20px 0 20px; 8 | width: 50%; 9 | box-sizing: border-box; 10 | display: inline-block; 11 | 12 | @include govuk-media-query($from: tablet) { 13 | max-width: 200px; 14 | } 15 | 16 | &.verify { 17 | border-right-style: solid; 18 | border-right-width: 1px; 19 | border-right-color: $govuk-border-colour; 20 | } 21 | 22 | &.verify:last-child { 23 | border-right-style: none; 24 | } 25 | } 26 | 27 | img { 28 | width: 100%; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pages/_privacy-notice.scss: -------------------------------------------------------------------------------- 1 | // For the user support address at the end of privacy-notice page 2 | address { 3 | font-style: normal; 4 | } 5 | 6 | 7 | // For paragraphs with the tag in the privacy-notice page 8 | b, 9 | strong { 10 | font-weight: bold; 11 | } 12 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pages/_response-processing.scss: -------------------------------------------------------------------------------- 1 | .response-processing { 2 | text-align: center; 3 | } 4 | 5 | .loading { 6 | width: 54px; 7 | height: 55px; 8 | } 9 | -------------------------------------------------------------------------------- /app/assets/stylesheets/pages/_select-phone.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/assets/stylesheets/pages/_select-phone.scss -------------------------------------------------------------------------------- /app/constraints/ab_test_constraint.rb: -------------------------------------------------------------------------------- 1 | module AbTestConstraint 2 | mattr_accessor :experiment_name, :experiment_loa, :trial_enabled 3 | def self.configure(ab_test_name: experiment_name, experiment_loa: loa, trial_enabled: false) 4 | self.experiment_name = ab_test_name 5 | self.experiment_loa = experiment_loa 6 | self.trial_enabled = trial_enabled 7 | self 8 | end 9 | 10 | def self.use(alternative:) 11 | SelectRoute.new(experiment_name, alternative, experiment_loa: experiment_loa, trial_enabled: trial_enabled) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/constraints/loa_match.rb: -------------------------------------------------------------------------------- 1 | module LoaMatch 2 | IsLoa1 = ->(request) { 3 | request.session[:requested_loa] == "LEVEL_1" 4 | } 5 | 6 | IsLoa2 = ->(request) { 7 | !IsLoa1.call(request) 8 | } 9 | end 10 | -------------------------------------------------------------------------------- /app/controllers/cancelled_registration_controller.rb: -------------------------------------------------------------------------------- 1 | require "partials/viewable_idp_partial_controller" 2 | 3 | class CancelledRegistrationController < ApplicationController 4 | include ViewableIdpPartialController 5 | before_action { @hide_feedback_link = true } 6 | 7 | def index 8 | @idp = IDENTITY_PROVIDER_DISPLAY_DECORATOR.decorate(selected_identity_provider) 9 | @transaction = current_transaction 10 | @other_ways_decorated = @transaction.other_ways_description 11 | @other_ways_decorated[0] = @other_ways_decorated[0].capitalize 12 | @identity_providers = IDENTITY_PROVIDER_DISPLAY_DECORATOR.decorate_collection(identity_providers_available_for_registration) 13 | 14 | render :cancelled_registration 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /app/controllers/confirmation_controller.rb: -------------------------------------------------------------------------------- 1 | class ConfirmationController < ApplicationController 2 | before_action { @hide_feedback_link = true } 3 | layout "slides" 4 | 5 | def matching_journey 6 | journey_confirmation(true) 7 | end 8 | 9 | def non_matching_journey 10 | journey_confirmation(false) 11 | report_to_analytics("Outcome - Matching Not Used By Service") 12 | end 13 | 14 | private 15 | 16 | def journey_confirmation(matching) 17 | @idp_name = IDENTITY_PROVIDER_DISPLAY_DECORATOR.decorate(selected_identity_provider).display_name 18 | @transaction_name = current_transaction.name 19 | @redirect_path = matching ? response_processing_path : redirect_to_service_signing_in_path 20 | @show_services_need_more_evidence = is_journey_loa1? 21 | render :confirmation 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /app/controllers/errors_controller.rb: -------------------------------------------------------------------------------- 1 | class ErrorsController < ApplicationController 2 | skip_before_action :validate_session 3 | skip_before_action :set_piwik_custom_variables 4 | 5 | def page_not_found 6 | respond_to do |format| 7 | format.html { render "404", status: 404 } 8 | format.all { head 404 } 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/controllers/failed_sign_in_controller.rb: -------------------------------------------------------------------------------- 1 | class FailedSignInController < ApplicationController 2 | def idp 3 | @entity = IDENTITY_PROVIDER_DISPLAY_DECORATOR.decorate(selected_identity_provider) 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/controllers/failed_uplift_controller.rb: -------------------------------------------------------------------------------- 1 | class FailedUpliftController < ApplicationController 2 | def index 3 | @idp = IDENTITY_PROVIDER_DISPLAY_DECORATOR.decorate(selected_identity_provider) 4 | @transaction = current_transaction 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/controllers/feedback_landing_controller.rb: -------------------------------------------------------------------------------- 1 | class FeedbackLandingController < ApplicationController 2 | skip_before_action :validate_session 3 | skip_before_action :set_piwik_custom_variables 4 | before_action { @hide_feedback_link = true } 5 | 6 | def index 7 | flash["feedback_referer"] = request.referer 8 | flash["feedback_source"] = params["feedback-source"] || flash["feedback_source"] 9 | @feedback_landing_heading = t("hub.feedback_landing.basic_heading") 10 | 11 | return if current_transaction_simple_id.nil? 12 | 13 | @other_ways_heading = t("hub.feedback_landing.services.heading") 14 | @other_ways_text = current_transaction.other_ways_text 15 | @service_name = current_transaction.name 16 | @feedback_landing_heading = t("hub.feedback_landing.heading", service_name: @service_name) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/controllers/feedback_sent_controller.rb: -------------------------------------------------------------------------------- 1 | class FeedbackSentController < ApplicationController 2 | skip_before_action :validate_session 3 | skip_before_action :set_piwik_custom_variables 4 | 5 | def index 6 | flash.keep("email_provided") 7 | flash.keep("feedback_source") 8 | @email_provided = flash["email_provided"] 9 | @session_valid = session_validator.validate(cookies, session).ok? 10 | @from_product_page = flash["feedback_source"] == "PRODUCT_PAGE" 11 | if @session_valid || @from_product_page 12 | @link_back = FEEDBACK_SOURCE_MAPPER.page_from_source(flash["feedback_source"], I18n.locale) 13 | end 14 | render 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/controllers/other_ways_to_access_service_controller.rb: -------------------------------------------------------------------------------- 1 | class OtherWaysToAccessServiceController < ApplicationController 2 | def index 3 | @other_ways_description = current_transaction.other_ways_description 4 | @other_ways_text = current_transaction.other_ways_text 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/controllers/prove_identity_controller.rb: -------------------------------------------------------------------------------- 1 | require "partials/journey_hinting_partial_controller" 2 | 3 | class ProveIdentityController < ApplicationController 4 | include JourneyHintingPartialController 5 | 6 | def index 7 | render :prove_identity unless try_render_journey_hint 8 | end 9 | 10 | def ignore_hint 11 | remove_hint_and_report 12 | redirect_to prove_identity_path 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/controllers/saml_controller.rb: -------------------------------------------------------------------------------- 1 | class SamlController < ApplicationController 2 | def set_locale 3 | I18n.locale = language_from_param || locale_from_locale_cookie || I18n.default_locale 4 | end 5 | 6 | private 7 | 8 | def language_from_param 9 | language = params[:language] 10 | %w{en cy}.detect { |available_locale| available_locale == language } 11 | end 12 | 13 | def locale_from_locale_cookie 14 | cookies.signed[CookieNames::VERIFY_LOCALE] 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/controllers/service_status_controller.rb: -------------------------------------------------------------------------------- 1 | class ServiceStatusController < ApplicationController 2 | skip_before_action :validate_session 3 | skip_before_action :set_piwik_custom_variables 4 | 5 | def index 6 | if ServiceStatus.unavailable? 7 | head 503 8 | else 9 | head 200 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/controllers/static_controller.rb: -------------------------------------------------------------------------------- 1 | class StaticController < ApplicationController 2 | skip_before_action :validate_session 3 | skip_before_action :set_piwik_custom_variables 4 | 5 | def humanstxt 6 | render plain: "GOV.UK Verify is built by a team at the Government Digital Service in London. If you'd like to join us, see https://identityassurance.blog.gov.uk/work-with-us/" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/controllers/test_analytics_controller.rb: -------------------------------------------------------------------------------- 1 | require "uri" 2 | 3 | class TestAnalyticsController < ApplicationController 4 | skip_before_action :validate_session 5 | skip_before_action :set_piwik_custom_variables 6 | 7 | def forward 8 | if PUBLIC_PIWIK.enabled? && INTERNAL_PIWIK.enabled? 9 | client = PoolingClient.new(INTERNAL_PIWIK.url, "User-Agent" => request.user_agent) 10 | uri = INTERNAL_PIWIK.url 11 | uri.query = request.query_parameters.to_param 12 | begin 13 | client.get(uri) 14 | rescue HTTP::ConnectionError => e 15 | logger.error("Error connecting to analytics #{INTERNAL_PIWIK.url}: #{e}") 16 | end 17 | end 18 | head :ok 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /app/controllers/test_csp_reporter_controller.rb: -------------------------------------------------------------------------------- 1 | class TestCspReporterController < ApplicationController 2 | skip_before_action :validate_session 3 | skip_before_action :set_piwik_custom_variables 4 | skip_before_action :verify_authenticity_token 5 | skip_after_action :store_locale_in_cookie 6 | 7 | def report 8 | # dump request to logs and do nothing else 9 | logger.info(request.body.read) 10 | head :ok 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/controllers/test_single_idp_journey_controller.rb: -------------------------------------------------------------------------------- 1 | class TestSingleIdpJourneyController < ApplicationController 2 | skip_before_action :validate_session 3 | skip_before_action :set_piwik_custom_variables 4 | skip_after_action :store_locale_in_cookie 5 | layout "test" 6 | 7 | def index 8 | render "index" 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/controllers/test_throttling_cookie_controller.rb: -------------------------------------------------------------------------------- 1 | class TestThrottlingCookieController < ApplicationController 2 | skip_before_action :validate_session 3 | skip_before_action :set_piwik_custom_variables 4 | skip_after_action :store_locale_in_cookie 5 | 6 | def set_cookie 7 | cookies.encrypted[CookieNames::THROTTLING] = params[:idp] 8 | head :no_content 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/models/.keep -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/app/models/concerns/.keep -------------------------------------------------------------------------------- /app/models/cookies/cookies.rb: -------------------------------------------------------------------------------- 1 | module Cookies 2 | def self.parse_json(cookie) 3 | begin 4 | hash = MultiJson.load(cookie) 5 | rescue MultiJson::ParseError, TypeError => e 6 | Rails.logger.debug("Cookie contains invalid JSON #{e}") 7 | hash = {} 8 | end 9 | hash 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/models/cycle_three_attribute_response.rb: -------------------------------------------------------------------------------- 1 | class CycleThreeAttributeResponse < Api::Response 2 | attr_reader :name 3 | validates_presence_of :name 4 | 5 | def initialize(hash) 6 | @name = hash["attributeName"] 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/models/display/cycle_three_display_data.rb: -------------------------------------------------------------------------------- 1 | module Display 2 | class CycleThreeDisplayData < DisplayData 3 | def prefix 4 | "cycle3" 5 | end 6 | 7 | content :name 8 | content :field_name 9 | content :help_to_find 10 | content :example 11 | content :intro_html, default: nil 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/models/display/idp_display_data.rb: -------------------------------------------------------------------------------- 1 | module Display 2 | class IdpDisplayData < DisplayData 3 | def prefix 4 | "idps" 5 | end 6 | 7 | content :name 8 | content :about 9 | content :requirements 10 | content :contact_details 11 | content :tagline, default: nil 12 | content :special_no_docs_instructions_html, default: "" 13 | content :no_docs_requirement, default: "" 14 | content :mobile_app_installation, default: "" 15 | 16 | alias_method :about_content, :about 17 | alias_method :display_name, :name 18 | alias_method :special_no_docs_instructions, :special_no_docs_instructions_html 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /app/models/display/not_viewable_identity_provider.rb: -------------------------------------------------------------------------------- 1 | module Display 2 | NotViewableIdentityProvider = Struct.new(:identity_provider) do 3 | delegate :entity_id, to: :identity_provider 4 | 5 | def viewable? 6 | false 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/models/display/not_viewable_scheme.rb: -------------------------------------------------------------------------------- 1 | module Display 2 | NotViewableScheme = Struct.new(:scheme) do 3 | delegate :display_name, to: :scheme 4 | 5 | def viewable? 6 | false 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/models/display/rp/transaction_filter.rb: -------------------------------------------------------------------------------- 1 | module Display 2 | module Rp 3 | class TransactionFilter 4 | def filter_by_loa(transactions, loa) 5 | transaction_list = [] 6 | transactions::values.each do |value| 7 | value.each do |transaction| 8 | if transaction.loa_list.min == loa 9 | transaction_list << transaction 10 | end 11 | end 12 | end 13 | transaction_list 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/models/evidence.rb: -------------------------------------------------------------------------------- 1 | module Evidence 2 | PHONE_ATTRIBUTES = %i[mobile_phone smart_phone].freeze 3 | PHONE_ONLY_ATTRIBUTES = %i[mobile_phone].freeze 4 | PHOTO_DOCUMENT_ATTRIBUTES = %i[passport driving_licence ni_driving_licence].freeze 5 | end 6 | -------------------------------------------------------------------------------- /app/models/further_information_service.rb: -------------------------------------------------------------------------------- 1 | class FurtherInformationService 2 | def initialize(policy_proxy, cycle_three_attribute_repo) 3 | @policy_proxy = policy_proxy 4 | @cycle_three_attribute_repo = cycle_three_attribute_repo 5 | end 6 | 7 | def get_attribute_for_session(session_id) 8 | attribute_key = @policy_proxy.cycle_three_attribute_name(session_id) 9 | @cycle_three_attribute_repo.fetch(attribute_key) 10 | end 11 | 12 | def submit(session_id, value) 13 | @policy_proxy.submit_cycle_three_value(session_id, value) 14 | end 15 | 16 | def cancel(session_id) 17 | @policy_proxy.cycle_three_cancel(session_id) 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /app/models/identity_provider_request.rb: -------------------------------------------------------------------------------- 1 | class IdentityProviderRequest 2 | attr_reader :location, :saml_request, :relay_state, :registration, :uuid 3 | 4 | def initialize(outbound_saml_message, uuid = nil) 5 | @location = outbound_saml_message.location 6 | @saml_request = outbound_saml_message.saml_request 7 | @relay_state = outbound_saml_message.relay_state 8 | @registration = outbound_saml_message.registration 9 | @uuid = uuid unless uuid.nil? 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/models/idp_authn_response.rb: -------------------------------------------------------------------------------- 1 | class IdpAuthnResponse < Api::Response 2 | attr_reader :idp_result, :is_registration, :loa_achieved, :assertion_expiry 3 | validates_presence_of :idp_result 4 | validates_inclusion_of :loa_achieved, in: ["LEVEL_1", "LEVEL_2", nil] 5 | validates_inclusion_of :is_registration, in: [true, false] 6 | 7 | def initialize(hash) 8 | @idp_result = hash["result"] 9 | @is_registration = hash["isRegistration"] 10 | @loa_achieved = hash["loaAchieved"] 11 | @assertion_expiry = hash["notOnOrAfter"] 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/models/idp_list_response.rb: -------------------------------------------------------------------------------- 1 | class IdpListResponse < Api::Response 2 | attr_reader :idps 3 | validate :consistent_idps 4 | 5 | def initialize(hash) 6 | @idps = hash.map { |idp| IdentityProvider.new(idp) } 7 | end 8 | 9 | def consistent_idps 10 | return if @idps.empty? 11 | 12 | if @idps.none?(&:valid?) 13 | errors.add(:identity_providers, "are malformed") 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/models/journey_type.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module JourneyType 4 | SIGN_IN = "sign-in" 5 | SIGN_IN_LAST_SUCCESSFUL_IDP = "sign-in-last-successful-idp" 6 | REGISTRATION = "registration" 7 | SINGLE_IDP = "single-idp" 8 | RESUMING = "resuming" 9 | end 10 | -------------------------------------------------------------------------------- /app/models/metadata_client.rb: -------------------------------------------------------------------------------- 1 | require "pooling_client" 2 | 3 | class MetadataClient 4 | def initialize(host) 5 | user_agent = "Verify Frontend Micro Service Client" 6 | @client = PoolingClient.new(host, "User-Agent" => user_agent) 7 | end 8 | 9 | def sp_metadata 10 | response = @client.get("/API/metadata/sp") 11 | handle_response(response) 12 | end 13 | 14 | def idp_metadata 15 | response = @client.get("/API/metadata/idp") 16 | handle_response(response) 17 | end 18 | 19 | def handle_response(response) 20 | if response.status == 200 21 | json_output = MultiJson.load(response.to_s) 22 | json_output.fetch("saml") { raise "Received 200, but could not find saml on response" } 23 | else 24 | raise Api::UpstreamError.new, "Expected 200 and got #{response.status}" 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /app/models/outbound_saml_message.rb: -------------------------------------------------------------------------------- 1 | class OutboundSamlMessage < Api::Response 2 | attr_reader :location, :saml_request, :relay_state, :registration 3 | validates_presence_of :location, :saml_request, :relay_state 4 | validates_inclusion_of :registration, in: [true, false] 5 | 6 | def initialize(hash) 7 | @location = hash["postEndpoint"] 8 | @saml_request = hash["samlMessage"] 9 | @relay_state = hash["relayState"] 10 | @registration = hash["registration"] 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/models/publish_hub_config_client.rb: -------------------------------------------------------------------------------- 1 | require "pooling_client" 2 | 3 | class PublishHubConfigClient 4 | def initialize(host) 5 | user_agent = "Verify Frontend Micro Service Client" 6 | @client = PoolingClient.new(host, "User-Agent" => user_agent) 7 | end 8 | 9 | def healthcheck 10 | @client.get("/service-status") 11 | end 12 | 13 | def certificates(path) 14 | @client.get("/config/certificates/" + path) 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/models/response_for_rp.rb: -------------------------------------------------------------------------------- 1 | class ResponseForRp < Api::Response 2 | attr_reader :location, :saml_message, :relay_state 3 | validates_presence_of :location, :saml_message 4 | 5 | def initialize(hash) 6 | @location = hash["postEndpoint"] 7 | @saml_message = hash["samlMessage"] 8 | @relay_state = hash["relayState"] 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/models/select_idp_response.rb: -------------------------------------------------------------------------------- 1 | class SelectIdpResponse < Api::Response 2 | attr_reader :encrypted_entity_id 3 | validates_presence_of :encrypted_entity_id 4 | 5 | def initialize(hash) 6 | @encrypted_entity_id = hash["encryptedEntityId"] 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/models/selected_provider_data.rb: -------------------------------------------------------------------------------- 1 | class SelectedProviderData < SimpleDelegator 2 | attr_reader :identity_provider 3 | 4 | def initialize(identity_provider) 5 | super(identity_provider) 6 | @identity_provider = identity_provider 7 | end 8 | 9 | def as_json(options = nil) 10 | { identity_provider: @identity_provider.as_json(options) } 11 | end 12 | 13 | def self.from_session(object) 14 | return object if object.is_a? SelectedProviderData 15 | 16 | new(object["identity_provider"]) if object.is_a? Hash 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/models/session_validator.rb: -------------------------------------------------------------------------------- 1 | class SessionValidator 2 | def initialize(session_duration) 3 | @validators = [ 4 | NoCookiesValidator.new, 5 | MissingCookiesValidator.new, 6 | SessionIdValidator.new, 7 | TransactionSimpleIdPresence.new, 8 | SessionStartTimeValidator.new(session_duration), 9 | CookieSizeValidator.new, 10 | RequestedLOAValidator.new, 11 | TransactionEntityIdPresence.new, 12 | ] 13 | end 14 | 15 | def validate(cookies, session) 16 | @validators.lazy.map { |validator| validator.validate(cookies, session) }.detect(&:bad?) || SuccessfulValidation 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/models/session_validator/cookie_size_validator.rb: -------------------------------------------------------------------------------- 1 | class SessionValidator 2 | class CookieSizeValidator 3 | def validate(_cookies, session) 4 | # an approximation of how big the session cookie values are 5 | session_cookie_size = session.to_hash.flatten.to_s.length 6 | Rails.logger.error("Session cookie is large: #{session_cookie_size}") if session_cookie_size > 3096 # 3Kb 7 | SuccessfulValidation 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/models/session_validator/idp_presence.rb: -------------------------------------------------------------------------------- 1 | class SessionValidator 2 | class IdpPresence 3 | ERROR_MESSAGE = "Idp(s) can not be found in the user's session".freeze 4 | def validate(_cookies, session) 5 | if session.include?(:identity_providers) 6 | SuccessfulValidation 7 | else 8 | ValidationFailure.something_went_wrong(ERROR_MESSAGE) 9 | end 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/models/session_validator/missing_cookies_validator.rb: -------------------------------------------------------------------------------- 1 | class SessionValidator 2 | class MissingCookiesValidator 3 | def validate(cookies, _session) 4 | missing_cookies = missing_session_cookies( 5 | cookies, [ 6 | ::CookieNames::SESSION_ID_COOKIE_NAME, 7 | ::CookieNames::SESSION_COOKIE_NAME, 8 | ] 9 | ) 10 | if missing_cookies.any? 11 | ValidationFailure.cookies_missing(missing_cookies) 12 | else 13 | SuccessfulValidation 14 | end 15 | end 16 | 17 | private 18 | 19 | def missing_session_cookies(cookies, cookie_names) 20 | cookie_names.reject { |cookie_name| cookies.key? cookie_name } 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /app/models/session_validator/no_cookies_validator.rb: -------------------------------------------------------------------------------- 1 | class SessionValidator 2 | class NoCookiesValidator 3 | def validate(cookies, _session) 4 | if all_cookies_missing?(cookies) 5 | ValidationFailure.no_cookies 6 | else 7 | SuccessfulValidation 8 | end 9 | end 10 | 11 | private 12 | 13 | def all_cookies_missing?(cookies) 14 | cookies.select { |name, _| ::CookieNames.session_cookies.include?(name) }.empty? 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/models/session_validator/requested_loa_validator.rb: -------------------------------------------------------------------------------- 1 | class SessionValidator 2 | class RequestedLOAValidator 3 | ERROR_MESSAGE = "Requested LOA can not be found in the user's session".freeze 4 | def validate(_cookies, session) 5 | if session.include?(:requested_loa) 6 | SuccessfulValidation 7 | else 8 | ValidationFailure.something_went_wrong(ERROR_MESSAGE) 9 | end 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/models/session_validator/successful_validation.rb: -------------------------------------------------------------------------------- 1 | require "session_validator/validation" 2 | 3 | class SessionValidator 4 | SuccessfulValidation = Validation.new.freeze 5 | end 6 | -------------------------------------------------------------------------------- /app/models/session_validator/transaction_entity_id_presence.rb: -------------------------------------------------------------------------------- 1 | class SessionValidator 2 | class TransactionEntityIdPresence 3 | ERROR_MESSAGE = "Transaction entity ID can not be found in the user's session".freeze 4 | def validate(_cookies, session) 5 | if session[:transaction_entity_id].nil? 6 | ValidationFailure.something_went_wrong(ERROR_MESSAGE) 7 | else 8 | SuccessfulValidation 9 | end 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/models/session_validator/transaction_simple_id_presence.rb: -------------------------------------------------------------------------------- 1 | class SessionValidator 2 | class TransactionSimpleIdPresence 3 | ERROR_MESSAGE = "Transaction simple ID can not be found in the user's session".freeze 4 | def validate(_cookies, session) 5 | if session.include?(:transaction_simple_id) 6 | SuccessfulValidation 7 | else 8 | ValidationFailure.something_went_wrong(ERROR_MESSAGE) 9 | end 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/models/session_validator/validation.rb: -------------------------------------------------------------------------------- 1 | class SessionValidator 2 | class Validation 3 | def ok? 4 | true 5 | end 6 | 7 | def bad? 8 | !ok? 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/models/sign_in_process_details_response.rb: -------------------------------------------------------------------------------- 1 | class SignInProcessDetailsResponse < Api::Response 2 | attr_reader :transaction_entity_id 3 | validates :transaction_entity_id, presence: true 4 | 5 | def initialize(hash) 6 | @transaction_entity_id = hash["requestIssuerId"] 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/models/start_form.rb: -------------------------------------------------------------------------------- 1 | class StartForm 2 | include ActiveModel::Model 3 | 4 | attr_reader :selection 5 | validate :answer_required 6 | 7 | def initialize(hash) 8 | @selection = hash[:selection] 9 | end 10 | 11 | def registration? 12 | self.selection == "true" 13 | end 14 | 15 | private 16 | 17 | def answer_required 18 | if @selection.blank? 19 | errors.add(:selection_true, I18n.t("hub.start.error_message")) 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /app/models/transaction_response.rb: -------------------------------------------------------------------------------- 1 | class TransactionResponse < Api::Response 2 | attr_reader :simple_id, :transaction_homepage, :levels_of_assurance, :headless_startpage 3 | validates :simple_id, :transaction_homepage, :levels_of_assurance, presence: true 4 | 5 | def initialize(hash) 6 | @simple_id = hash["simpleId"] 7 | @transaction_homepage = hash["serviceHomepage"] 8 | @levels_of_assurance = hash["loaList"] 9 | @headless_startpage = hash["headlessStartpage"] 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/services/rp_translation_service.rb: -------------------------------------------------------------------------------- 1 | class RpTranslationService 2 | def initialize 3 | @locales = %w[en cy] 4 | end 5 | 6 | def update_rp_translations(transaction) 7 | @locales.each do |locale| 8 | translations = get_translations(transaction, locale) 9 | I18n.backend.store_translations(locale, rps: Hash[transaction, translations]) unless translations.empty? 10 | end 11 | end 12 | 13 | private 14 | 15 | def get_translations(transaction, locale) 16 | CONFIG_PROXY.get_transaction_translations(transaction, locale) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/views/about/choosing_a_company.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.about.choosing_a_company.heading' %> 2 | <% content_for :feedback_source, 'ABOUT_CHOOSING_A_COMPANY_PAGE' %> 3 | 4 |
5 |
6 |

<%= t 'hub.about.choosing_a_company.heading' %>

7 | <%= t 'hub.about.choosing_a_company.content_html' %> 8 |
9 | <%= button_link_to t('navigation.continue'), @continue_path, id: 'next-button', class: 'govuk-button' %> 10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /app/views/about/prove_your_identity_another_way.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.about.prove_your_identity_another_way.heading' %> 2 | <% content_for :feedback_source, 'PROVE_YOUR_IDENTITY_ANOTHER_WAY_PAGE' %> 3 | 4 |
5 |
6 |

<%= t("hub.about.prove_your_identity_another_way.heading") %>

7 |

<%= t("hub.about.prove_your_identity_another_way.sub_heading", service_name: @service_name) %>

8 |
9 | <%= raw @other_ways_text %> 10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /app/views/completed_registration/index.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.completed_registration.heading', idp_name: @idp.display_name %> 2 | 3 | <% content_for :feedback_source, 'COMPLETED_REGISTRATION_PAGE' %> 4 | <% content_for :show_to_search_engine, false %> 5 | 6 |
7 |
8 |

<%= t 'hub.completed_registration.heading', idp_name: @idp.display_name %>

9 |

<%= t 'hub.completed_registration.message_one' %>

10 |

<%= t 'hub.completed_registration.message_two', idp_name: @idp.display_name %>

11 |

<%= t 'hub.completed_registration.select_service' %>

12 | <%= render partial: 'shared/transaction_list' %> 13 |
14 |
15 | -------------------------------------------------------------------------------- /app/views/errors/404.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'errors.page_not_found.heading' %> 2 | <% content_for :feedback_source, 'ERROR_PAGE' %> 3 | 4 |
5 |
6 |

<%= t 'errors.page_not_found.heading' %>

7 |

<%= t 'errors.page_not_found.reason_pre' %>

8 |
    9 |
  • <%= t 'errors.page_not_found.reason_one' %>
  • 10 |
  • <%= t 'errors.page_not_found.reason_two' %>
  • 11 |
12 |
13 |
-------------------------------------------------------------------------------- /app/views/errors/no_cookies.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'errors.no_cookies.heading' %> 2 | <% content_for :feedback_source, 'COOKIE_NOT_FOUND_PAGE' %> 3 | <% content_for :piwik_custom_path, '/cookies-not-found' %> 4 | 5 |
6 |
7 |

<%= t 'errors.no_cookies.heading' %>

8 |

<%= t 'errors.no_cookies.access_restriction' %>

9 |

<%= t 'hub.transaction_list.heading' %>

10 | <%= render partial: 'shared/transaction_list' %> 11 |

<%= t 'errors.no_cookies.read_more_html' %>

12 |

<%= t 'errors.no_cookies.enable_cookies' %>

13 |
14 |
-------------------------------------------------------------------------------- /app/views/errors/session_error.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'errors.session_error.heading' %> 2 | <% content_for :feedback_source, 'ERROR_PAGE' %> 3 | <% content_for :piwik_custom_path, '/errors/session-error' %> 4 | 5 |
6 |
7 |

<%= t 'errors.session_error.heading' %>

8 |

<%= t 'errors.session_error.security' %>

9 |

<%= link_to t('errors.session_error.start_again'), '/redirect-to-service/error' %>

10 |

<%= raw t('errors.session_error.feedback_message', feedback_link: link_to(t('errors.session_error.feedback'), feedback_path('feedback-source' => feedback_source))) %>

11 |
12 |
-------------------------------------------------------------------------------- /app/views/errors/something_went_wrong.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'errors.something_went_wrong.heading' %> 2 | <% content_for :feedback_source, 'ERROR_PAGE' %> 3 | <% content_for :piwik_custom_path, 'errors/generic-error' %> 4 | 5 |
6 |
7 |

<%= t 'errors.something_went_wrong.heading' %>

8 |

<%= t 'errors.something_went_wrong.error_message' %>

9 |

<%= t 'errors.something_went_wrong.start_again' %>

10 | <% if transaction_taxon_list.any? %> 11 |

<%= t 'hub.transaction_list.heading' %>

12 | <%= render partial: 'shared/transaction_list' %> 13 | <% end %> 14 |
15 |
-------------------------------------------------------------------------------- /app/views/failed_sign_in/idp.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.failed_sign_in.heading', display_name: @entity.display_name %> 2 | <% content_for :feedback_source, 'FAILED_SIGN_IN_PAGE' %> 3 | 4 |
5 |
6 |

<%= t 'hub.failed_sign_in.heading', display_name: @entity.display_name %>

7 | 8 | <%= t 'hub.failed_sign_in.reasons_html' %> 9 | <%= button_link_to t('hub.failed_sign_in.start_again'), start_path, id: 'startAgain', class: 'govuk-button' %> 10 |
11 |
12 | -------------------------------------------------------------------------------- /app/views/feedback/disabled.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.feedback_disabled.heading' %> 2 | 3 |
4 |
5 | 6 | 15 |
16 |
17 | -------------------------------------------------------------------------------- /app/views/feedback/sent.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.feedback_sent.heading' %> 2 | 3 |
4 |
5 |

<%= t 'hub.feedback_sent.heading' %>

6 |

<%= t 'hub.feedback_sent.sub_heading' %>

7 | 8 | <% if emailProvided %> 9 |

<%= t 'hub.feedback_sent.message_email' %>

10 | <% else %> 11 |

<%= t 'hub.feedback_sent.message_no_email' %>

12 | <% end %> 13 | 14 | <% if sessionValid %> 15 |

<%= link_to t('hub.feedback_sent.start_again_link'), start_path %>

16 | <% else %> 17 |

<%= t 'hub.feedback_sent.session_timeout' %>

18 | <% end %> 19 |
20 |
21 | -------------------------------------------------------------------------------- /app/views/layouts/main_layout.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :main do %> 2 |
3 |
4 | <%= yield %> 5 |
6 |
7 | <% end %> 8 | <%= render template: 'layouts/application' %> -------------------------------------------------------------------------------- /app/views/layouts/test.html.erb: -------------------------------------------------------------------------------- 1 | <%= content_for?(:main) ? yield(:main) : yield %> 2 | -------------------------------------------------------------------------------- /app/views/other_ways_to_access_service/index.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.other_ways_heading', other_ways_description: @other_ways_description %> 2 | <% content_for :feedback_source, 'OTHER_WAYS_PAGE' %> 3 | 4 |
5 |
6 |

<%= t 'hub.other_ways_heading', other_ways_description: @other_ways_description %>

7 |
8 | <%= raw @other_ways_text %> 9 |
10 |
11 |
12 | -------------------------------------------------------------------------------- /app/views/paused_registration/from_resume_link.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.paused_registration.from_resume_link.heading', idp_name: @idp_display_data.name %> 2 | <% content_for :feedback_source, 'PAUSED_REGISTRATION_PAGE' %> 3 | 4 |
5 |
6 |

<%= t 'hub.paused_registration.from_resume_link.heading', idp_name: @idp_display_data.name %>

7 | 8 |

<%= t 'hub.paused_registration.from_resume_link.restart_instructions_html', idp_name: @idp_display_data.name %>

9 | 10 |

<%= t 'hub.transaction_list.heading' %>

11 | <%= render partial: 'shared/transaction_list_prefer_headless_start' %> 12 |
13 |
-------------------------------------------------------------------------------- /app/views/paused_registration/idp_no_longer_providing_registrations.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.paused_registration.idp_no_longer_providing_registrations.title', idp_name: @idp.display_name %> 2 | 3 |
4 |
5 |

<%= t 'hub.paused_registration.idp_no_longer_providing_registrations.heading', idp_name: @idp.display_name %>

6 | 7 |

<%= t 'hub.paused_registration.idp_no_longer_providing_registrations.return_html', rp_start_page: @transaction[:homepage] %>

8 | 9 |
10 |
11 | -------------------------------------------------------------------------------- /app/views/paused_registration/without_user_session.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.paused_registration.without_session.heading' %> 2 | <% content_for :feedback_source, 'PAUSED_REGISTRATION_PAGE' %> 3 | 4 |
5 |
6 |

<%= t 'hub.paused_registration.without_session.heading' %>

7 | 8 |

<%= t 'hub.paused_registration.without_session.restart_instructions_html' %>

9 | 10 |

<%= t 'hub.transaction_list.heading' %>

11 | <%= render partial: 'shared/transaction_list' %> 12 |
13 |
14 | -------------------------------------------------------------------------------- /app/views/prove_identity/prove_identity.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.prove_identity.heading' %> 2 | <% content_for :feedback_source, 'PROVE_IDENTITY_PAGE' %> 3 | 4 |
5 |
6 |

<%= t 'hub.prove_identity.heading' %>

7 |

<%= t 'hub.prove_identity.header_content' %> <%= current_transaction.name %>.

8 | 9 |

<%= t 'hub.prove_identity.use_verify.heading' %>

10 | <%= t 'hub.prove_identity.use_verify.content_html' %> 11 | <%= button_link_to t('hub.prove_identity.use_verify.button_text'), start_path, class: "govuk-button" %> 12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /app/views/response_processing/index.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.response_processing.heading', rp_name: @rp_name %> 2 | <% content_for :meta_refresh, '2' %> 3 | 4 | -------------------------------------------------------------------------------- /app/views/shared/_available_languages.html.erb: -------------------------------------------------------------------------------- 1 | 2 |
3 | 19 |
20 | -------------------------------------------------------------------------------- /app/views/shared/_continue_to_idp_form.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_tag({}, { id: 'post-to-idp', class: 'hidden', authenticity_token: false, enforce_utf8: false }) do %> 2 | 3 | 4 | 5 | 6 | 7 | <% end %> 8 | -------------------------------------------------------------------------------- /app/views/shared/_feedback_landing_link.html.erb: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /app/views/shared/_feedback_link.html.erb: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /app/views/shared/_ga.html.erb: -------------------------------------------------------------------------------- 1 | <% if @render_cross_gov_ga && cross_gov_ga.enabled? %> 2 | 3 | 4 | <% end %> -------------------------------------------------------------------------------- /app/views/shared/_logos_container.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 6 |
-------------------------------------------------------------------------------- /app/views/shared/_other_ways.html.erb: -------------------------------------------------------------------------------- 1 |

<%= t 'hub.other_ways_heading', other_ways_description: other_ways_description %>

2 |
3 | <%= raw other_ways_text %> 4 |
-------------------------------------------------------------------------------- /app/views/shared/_transaction_list.html.erb: -------------------------------------------------------------------------------- 1 | <% taxons = transaction_taxon_list %> 2 | <% if taxons.any? %> 3 | 16 | <% end %> 17 | -------------------------------------------------------------------------------- /app/views/shared/_transaction_list_prefer_headless_start.html.erb: -------------------------------------------------------------------------------- 1 | <% taxons = transaction_taxon_list %> 2 | <% if taxons.any? %> 3 | <% taxons.each do |taxon| %> 4 |

<%= taxon.name %>

5 | 19 | <% end %> 20 | <% end %> 21 | -------------------------------------------------------------------------------- /app/views/single_idp_journey/rp_start_page.html.erb: -------------------------------------------------------------------------------- 1 | <%= content_for :page_title, @translation[:single_idp_start_page_title] %> 2 | <%= content_for :show_to_search_engine, false %> 3 | <%= analytics_title @english_translation[:single_idp_start_page_title] %> 4 | 5 |
6 | 9 |
-------------------------------------------------------------------------------- /app/views/static/forgot_company.en.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.forgot_company.heading' %> 2 | <% content_for :feedback_source, 'FORGOT_COMPANY_PAGE' %> 3 | 4 |
5 |
6 | <%= link_to t('navigation.back'), sign_in_path, class: 'govuk-back-link' %> 7 |

We can’t tell you which company verified you

8 |

Security standards mean GOV.UK can’t store your information, so we can’t tell you which company you registered with.

9 |

Look for correspondence from a certified company. Check your:

10 |
    11 |
  • email inbox for the confirmation email
  • 12 |
  • spam folder and deleted emails
  • 13 |
  • texts on your mobile phone
  • 14 |
15 |
16 |
-------------------------------------------------------------------------------- /app/views/static/verify_services.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.verify_services.heading' %> 2 | 3 | <% content_for :feedback_source, 'VERIFY_SERVICES_PAGE' %> 4 | <% content_for :show_to_search_engine, true %> 5 | 6 |
7 |
8 |

<%= t 'hub.verify_services.heading' %>

9 |

<%= t 'hub.verify_services.message' %> <%= t 'hub.verify_services.link_name' %>.

10 |
11 |
-------------------------------------------------------------------------------- /app/views/test_journey_hint_cookie/index.html.erb: -------------------------------------------------------------------------------- 1 | Current value: <%= @current_cookie %> 2 | <%= form_tag(test_journey_hint_path) do -%> 3 | <%= text_field_tag('entity-id') %> 4 | <%= text_field_tag('locale') %> 5 | <%= text_field_tag('status') %> 6 | <%= text_field_tag('rp-entity-id') %> 7 | <%= text_field_tag('resume-link-simple-id') %> 8 |
<%= submit_tag 'journey-hint-post' %>
9 | <% end -%> 10 | -------------------------------------------------------------------------------- /app/views/test_saml/idp_request.html.erb: -------------------------------------------------------------------------------- 1 | BANG! You're at an IDP! 2 |

3 | The IDP received this:
4 | SAML Request is '<%= @saml_request %>'
5 | relay state is '<%= @relay_state %>'
6 | registration is '<%= @registration %>'
7 | <% unless @single_idp.nil? %> 8 | single IDP journey uuid is '<%= @single_idp %>' 9 | <% end %> 10 |
11 | <%= form_tag('/SAML2/SSO/Response/POST') do -%> 12 | <%= hidden_field_tag('SAMLResponse', 'my-saml-response') %> 13 | <%= hidden_field_tag('RelayState', params.fetch('session-id', session[:verify_session_id])) %> 14 |
<%= submit_tag 'Send authn response' %>
15 | <% end -%> 16 | -------------------------------------------------------------------------------- /app/views/test_single_idp_journey/index.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_tag(initiate_single_idp_journey_path) do -%> 2 | <%= text_field_tag('serviceId', 'http://www.test-rp.gov.uk/SAML2/MD', placeholder: 'serviceId') %> 3 | <%= text_field_tag('idpEntityId', 'http://idcorp.com', placeholder: 'idpEntityId') %> 4 | <%= text_field_tag('singleIdpJourneyIdentifier', SecureRandom.uuid) %> 5 |
<%= submit_tag 'initiate-single-idp-post' %>
6 | <% end -%> 7 | -------------------------------------------------------------------------------- /app/views/will_it_work_for_me/will_not_work_without_uk_address.html.erb: -------------------------------------------------------------------------------- 1 | <%= page_title 'hub.will_not_work_without_uk_address.heading' %> 2 | <% content_for :feedback_source, 'WILL_NOT_WORK_WITHOUT_UK_ADDRESS_PAGE' %> 3 | 4 |
5 |
6 |

<%= t 'hub.will_not_work_without_uk_address.heading' %>

7 | 8 |

<%= t 'hub.will_not_work_without_uk_address.explanation' %>

9 |

<%= t 'hub.other_ways_heading', other_ways_description: @other_ways_description %>

10 |
11 |

12 | <%= raw @other_ways_text %> 13 |

14 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /architecture-decisions/0001-record-architecture-decisions.md: -------------------------------------------------------------------------------- 1 | # 1. Record architecture decisions 2 | 3 | Date: 05/04/2017 4 | 5 | ## Status 6 | 7 | Accepted 8 | 9 | ## Context 10 | 11 | We need to record the architectural decisions made on this project. 12 | 13 | ## Decision 14 | 15 | We will use Architecture Decision Records, as described by Michael Nygard in this article: http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions 16 | 17 | ## Consequences 18 | 19 | See Michael Nygard's article, linked above. 20 | -------------------------------------------------------------------------------- /bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | APP_PATH = File.expand_path('../../config/application', __FILE__) 8 | require_relative '../config/boot' 9 | require 'rails/commands' 10 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | require_relative '../config/boot' 8 | require 'rake' 9 | Rake.application.run 10 | -------------------------------------------------------------------------------- /bin/spring: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # This file loads spring without using Bundler, in order to be fast. 4 | # It gets overwritten when you run the `spring binstub` command. 5 | 6 | unless defined?(Spring) 7 | require 'rubygems' 8 | require 'bundler' 9 | 10 | if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)) 11 | Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq } 12 | gem 'spring', match[1] 13 | require 'spring/binstub' 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /conf.d/zdd_latch.conf: -------------------------------------------------------------------------------- 1 | export ZDD_LATCH=/ida/front/tmp/.service_unavailable 2 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('../config/environment', __FILE__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) 2 | 3 | require "bundler/setup" # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path("application", __dir__) 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /config/initializers/20_localisation.rb: -------------------------------------------------------------------------------- 1 | # Add additional paths to load for I18n 2 | Rails.application.config.i18n.load_path += Dir[File.join(CONFIG.idp_display_locales, "*.yml").to_s] 3 | Rails.application.config.i18n.load_path += Dir[File.join(CONFIG.cycle_3_display_locales, "*.yml").to_s] 4 | Rails.application.config.i18n.fallbacks = [:en] 5 | -------------------------------------------------------------------------------- /config/initializers/30_api_proxies.rb: -------------------------------------------------------------------------------- 1 | require "originating_ip_store" 2 | require "api" 3 | 4 | Rails.application.config.after_initialize do 5 | config_api_client = Api::Client.new(CONFIG.config_api_host, Api::HubResponseHandler.new) 6 | CONFIG_PROXY = ConfigProxy.new(config_api_client) 7 | 8 | saml_proxy_client = Api::Client.new(CONFIG.saml_proxy_host, Api::HubResponseHandler.new) 9 | SAML_PROXY_API = SamlProxyApi.new(saml_proxy_client, OriginatingIpStore) 10 | 11 | policy_client = Api::Client.new(CONFIG.policy_host, Api::HubResponseHandler.new) 12 | POLICY_PROXY = PolicyProxy.new(policy_client, OriginatingIpStore) 13 | end 14 | -------------------------------------------------------------------------------- /config/initializers/ab_tests.rb: -------------------------------------------------------------------------------- 1 | def env_var_set? 2 | CONFIG.ab_test_file 3 | end 4 | 5 | def build_experiment_hash 6 | if !env_var_set? then return {}.freeze end 7 | 8 | experiments = YAML.load_file(CONFIG.ab_test_file)["experiments"] 9 | if !experiments then return {}.freeze end 10 | 11 | experiments.inject({}) do |ab_tests, experiment| 12 | ab_tests[experiment.keys.first] = AbTest::Experiment.new(experiment) 13 | ab_tests 14 | end 15 | end 16 | 17 | AB_TESTS = build_experiment_hash 18 | -------------------------------------------------------------------------------- /config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = "1.0" 5 | 6 | # Add additional assets to the asset load path 7 | # Rails.application.config.assets.paths << Emoji.images_path 8 | Rails.application.config.assets.paths << Rails.root.join("lib/node_modules") 9 | 10 | # Precompile additional assets. 11 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 12 | Rails.application.config.assets.precompile += %w(style.css style-ie8.css gov.uk_logotype_crown.svg piwik_idp_picker_tracking.js all.js jasmine-jquery.js *.woff *.woff2 *.ico *.svg *.png) 13 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /config/initializers/feedback.rb: -------------------------------------------------------------------------------- 1 | require "zendesk_api" 2 | require "zendesk_client" 3 | 4 | if Rails.env == "test" 5 | require "feedback/dummy_zendesk_client" 6 | DUMMY_ZENDESK_CLIENT = Feedback::DummyZendeskClient.new 7 | ZENDESK_CLIENT = ZendeskClient.new(DUMMY_ZENDESK_CLIENT, Rails.logger) 8 | else 9 | client = ZendeskAPI::Client.new do |config| 10 | config.url = CONFIG.zendesk_url 11 | config.username = CONFIG.zendesk_username 12 | config.token = CONFIG.zendesk_token 13 | if CONFIG.zendesk_proxy 14 | config.client_options[:proxy] = { uri: CONFIG.zendesk_proxy } 15 | end 16 | end 17 | ZENDESK_CLIENT = ZendeskClient.new(client, Rails.logger) 18 | end 19 | 20 | FEEDBACK_SERVICE = FeedbackService.new(ZENDESK_CLIENT, CONFIG.zendesk_username) 21 | -------------------------------------------------------------------------------- /config/initializers/feedback_source_mapper.rb: -------------------------------------------------------------------------------- 1 | FEEDBACK_SOURCE_MAPPER = FeedbackSourceMapper.new(CONFIG.product_page_url) 2 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /config/initializers/http.rb: -------------------------------------------------------------------------------- 1 | require "ssl_context_factory" 2 | ssl_context = SSLContextFactory.new.create_context 3 | HTTP.default_options = { ssl_context: ssl_context } 4 | HTTP.timeout(read: CONFIG.read_timeout, connect: CONFIG.connect_timeout) 5 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /config/initializers/metadata_client.rb: -------------------------------------------------------------------------------- 1 | METADATA_CLIENT = MetadataClient.new(CONFIG.saml_proxy_host) 2 | -------------------------------------------------------------------------------- /config/initializers/middleware_service_status_filter.rb: -------------------------------------------------------------------------------- 1 | require "store_session_id" 2 | Rails.application.config.middleware.insert_before Rails::Rack::Logger, StoreSessionId 3 | -------------------------------------------------------------------------------- /config/initializers/middleware_store_session_id.rb: -------------------------------------------------------------------------------- 1 | require "service_status_filter" 2 | Rails.application.config.middleware.use ServiceStatusFilter 3 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /config/initializers/prometheus.rb: -------------------------------------------------------------------------------- 1 | require "prometheus" 2 | 3 | if CONFIG.prometheus_enabled 4 | event_source = ActiveSupport::Notifications 5 | event_subscriber = Prometheus::EventSubscriber.new(event_source) 6 | 7 | controller_action_reporter = Prometheus::ControllerActionReporter.new 8 | event_subscriber.subscribe(/process_action.action_controller/, controller_action_reporter) 9 | 10 | api_request_reporter = Prometheus::ApiRequestReporter.new 11 | event_subscriber.subscribe(/api_request/, api_request_reporter) 12 | 13 | session_timeout_reporter = Prometheus::SessionTimeoutReporter.new 14 | event_subscriber.subscribe(/session_timeout/, session_timeout_reporter) 15 | end 16 | -------------------------------------------------------------------------------- /config/initializers/publish_hub_config_client.rb: -------------------------------------------------------------------------------- 1 | PUBLISH_HUB_CONFIG_CLIENT = PublishHubConfigClient.new(CONFIG.config_api_host) if CONFIG.publish_hub_config_enabled 2 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | require "cookie_names" 3 | 4 | Rails.application.config.session_store :cookie_store, key: CookieNames::SESSION_COOKIE_NAME 5 | -------------------------------------------------------------------------------- /config/initializers/session_validator.rb: -------------------------------------------------------------------------------- 1 | SESSION_VALIDATOR = SessionValidator.new(Integer(CONFIG.session_cookie_duration_mins)) 2 | -------------------------------------------------------------------------------- /config/initializers/throttling.rb: -------------------------------------------------------------------------------- 1 | def env_var_set? 2 | CONFIG.throttling_file 3 | end 4 | 5 | def build_logic_hash 6 | if !env_var_set? then return {}.freeze end 7 | 8 | options = YAML.load_file(CONFIG.throttling_file) 9 | if !options then return {}.freeze end 10 | 11 | AbTest::Experiment.new(options) 12 | end 13 | 14 | THROTTLING = build_logic_hash 15 | -------------------------------------------------------------------------------- /config/initializers/verify_form_builder.rb: -------------------------------------------------------------------------------- 1 | require "verify_form_builder" 2 | ActionView::Base.default_form_builder = VerifyFormBuilder 3 | -------------------------------------------------------------------------------- /config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | -------------------------------------------------------------------------------- /config/puma.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env puma 2 | 3 | require "prometheus/client" 4 | require "prometheus/client/data_stores/direct_file_store" 5 | 6 | environment "production" 7 | 8 | pidfile "tmp/puma.pid" 9 | state_path "tmp/puma.state" 10 | stdout_redirect "log/puma.stdout", "log/puma.stderr", true 11 | 12 | metrics_dir = Dir.mktmpdir("frontend-metrics") 13 | 14 | on_worker_boot do 15 | Prometheus::Client.config.data_store = Prometheus::Client::DataStores::DirectFileStore.new(dir: metrics_dir) 16 | end 17 | 18 | bind "unix://tmp/puma.sock" 19 | 20 | workers 2 unless Gem.win_platform? 21 | -------------------------------------------------------------------------------- /db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) 7 | # Mayor.create(name: 'Emanuel', city: cities.first) 8 | -------------------------------------------------------------------------------- /heroku-startup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "Heroku instance" 4 | 5 | if [ "$1" == '--stub-api' ] 6 | then 7 | echo "Starting stub-api server on port 50199" 8 | export CONFIG_API_HOST=http://localhost:50199 9 | export POLICY_HOST=http://localhost:50199 10 | export SAML_PROXY_HOST=http://localhost:50199 11 | ( 12 | export BUNDLE_GEMFILE=stub/api/Gemfile 13 | bundle check || bundle install 14 | bundle exec rackup --daemonize --port 50199 --pid tmp/stub_api.pid stub/api/stub_api_conf.ru 15 | ) 16 | fi 17 | 18 | RAILS_ENV=production bundle exec puma -p $PORT 19 | -------------------------------------------------------------------------------- /heroku.yml: -------------------------------------------------------------------------------- 1 | build: 2 | docker: 3 | web: Dockerfile.heroku 4 | run: 5 | web: ./heroku-startup.sh --stub-api -------------------------------------------------------------------------------- /kill-service.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd "$(dirname "$0")" 4 | 5 | if [ -a './tmp/stub_api.pid' ] 6 | then 7 | kill "$(< ./tmp/stub_api.pid)" 8 | rm ./tmp/stub_api.pid 2>/dev/null 9 | fi 10 | 11 | if [ -a './tmp/puma.pid' ] 12 | then 13 | kill "$(< ./tmp/puma.pid)" 14 | rm ./tmp/puma.pid 15 | fi 16 | -------------------------------------------------------------------------------- /lib/analytics.rb: -------------------------------------------------------------------------------- 1 | require "analytics/reporter" 2 | require "analytics/piwik_client" 3 | require "analytics/custom_variable" 4 | require "analytics/null_reporter" 5 | -------------------------------------------------------------------------------- /lib/analytics/null_reporter.rb: -------------------------------------------------------------------------------- 1 | module Analytics 2 | class NullReporter 3 | def report_custom_variable(*args); end 4 | 5 | def report(*args); end 6 | 7 | def report_to_piwik(*args); end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /lib/api.rb: -------------------------------------------------------------------------------- 1 | require "api/client" 2 | require "api/error" 3 | require "api/response" 4 | require "api/hub_response_handler" 5 | require "api/session_error" 6 | require "api/session_timeout_error" 7 | require "api/upstream_error" 8 | -------------------------------------------------------------------------------- /lib/api/error.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | class Error < StandardError 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /lib/api/response.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | class Response 3 | include ActiveModel::Model 4 | 5 | def self.validated_response(hash_response) 6 | self.new(hash_response || {}).tap(&:validate) 7 | end 8 | 9 | def validate 10 | raise ModelError, self.errors.full_messages.join(", ") unless self.valid? 11 | end 12 | 13 | ModelError = Class.new(StandardError) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/api/session_error.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | class SessionError < Api::Error 3 | TYPE = "SESSION_ERROR".freeze 4 | 5 | #This was called SESSION_ERROR by frontend api 6 | HUB_TYPE = "EXPECTED_SESSION_STARTED_STATE_ACTUAL_IDP_SELECTED_STATE".freeze 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /lib/api/session_timeout_error.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | class SessionTimeoutError < Api::Error 3 | TYPE = "SESSION_TIMEOUT".freeze 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /lib/api/upstream_error.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | class UpstreamError < Api::Error 3 | attr_reader :hub_type 4 | 5 | def initialize(hub_type = nil) 6 | @hub_type = hub_type 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/assets/.keep -------------------------------------------------------------------------------- /lib/errors/warning_level_error.rb: -------------------------------------------------------------------------------- 1 | module Errors 2 | class WarningLevelError < StandardError 3 | TYPE = "WARNING_LEVEL_ERROR".freeze 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /lib/google_analytics.rb: -------------------------------------------------------------------------------- 1 | require "uri" 2 | 3 | class GoogleAnalytics 4 | attr_reader :tracker_id, :cross_domain_list 5 | 6 | def initialize(tracker_id, cross_domain_list = []) 7 | @enabled = tracker_id.present? 8 | @tracker_id = tracker_id 9 | @cross_domain_list = cross_domain_list 10 | end 11 | 12 | def enabled? 13 | @enabled 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/metrics.rb: -------------------------------------------------------------------------------- 1 | require "metrics/api_request_reporter" 2 | require "metrics/controller_action_reporter" 3 | require "metrics/response_status_reporter" 4 | require "metrics/event_subscriber" 5 | 6 | module Metrics 7 | KEY_DELIMITER = ".".freeze 8 | TOTAL_DURATION = "total_duration".freeze 9 | VIEW_RUNTIME = "view_runtime".freeze 10 | COUNT = "count".freeze 11 | 12 | def self.duration(finish, start) 13 | # The statsd plugin for collectd expects timing values in ms 14 | (finish - start) * 1_000 15 | end 16 | 17 | def self.metric_key(source, metric) 18 | [source, metric].join(KEY_DELIMITER) 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/metrics/api_request_reporter.rb: -------------------------------------------------------------------------------- 1 | module Metrics 2 | class ApiRequestReporter 3 | def initialize(statsd_client) 4 | @statsd_client = statsd_client 5 | end 6 | 7 | def report(_name, start, finish, _id, payload) 8 | # args name and id get passed from ActiveSupport, however we will not need them to report. 9 | source = ["Api", "request", payload[:method]] 10 | @statsd_client.timing(Metrics::metric_key(source, TOTAL_DURATION), Metrics::duration(finish, start)) 11 | @statsd_client.increment(Metrics::metric_key(source, COUNT)) 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/metrics/controller_action_reporter.rb: -------------------------------------------------------------------------------- 1 | module Metrics 2 | class ControllerActionReporter 3 | def initialize(statsd_client) 4 | @statsd_client = statsd_client 5 | end 6 | 7 | def report(_name, start, finish, _id, payload) 8 | # args name and id get passed from ActiveSupport, however we will not need them to report. 9 | source = [payload[:controller], payload[:action]] 10 | @statsd_client.timing(Metrics::metric_key(source, TOTAL_DURATION), Metrics::duration(finish, start)) 11 | view_runtime = payload[:view_runtime] 12 | @statsd_client.timing(Metrics::metric_key(source, VIEW_RUNTIME), view_runtime) unless view_runtime.nil? 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/metrics/event_subscriber.rb: -------------------------------------------------------------------------------- 1 | module Metrics 2 | class EventSubscriber 3 | def initialize(event_source) 4 | @event_source = event_source 5 | end 6 | 7 | def subscribe(filter, reporter) 8 | @event_source.subscribe filter do |*args| 9 | reporter.report(*args) 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/metrics/response_status_reporter.rb: -------------------------------------------------------------------------------- 1 | module Metrics 2 | class ResponseStatusReporter 3 | def initialize(statsd_client, logger = Rails.logger) 4 | @statsd_client = statsd_client 5 | @logger = logger 6 | end 7 | 8 | def report(_name, _start, _finish, _id, payload) 9 | if payload[:path] != "/service-status" 10 | begin 11 | status_code = Integer(payload[:status]) 12 | @statsd_client.increment("#{status_code / 100}xx_responses") 13 | rescue TypeError #status code is not a number 14 | @logger.warn("unable to read status code from response") 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/node_modules/.yarn-integrity: -------------------------------------------------------------------------------- 1 | { 2 | "systemParams": "darwin-arm64-108", 3 | "modulesFolders": [ 4 | "node_modules" 5 | ], 6 | "flags": [], 7 | "linkedModules": [], 8 | "topLevelPatterns": [ 9 | "govuk-frontend@^3.5.0" 10 | ], 11 | "lockfileEntries": { 12 | "govuk-frontend@^3.5.0": "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-3.14.0.tgz#d3a9c54437c08f5188f87b1f4480ba60e95c8eb6" 13 | }, 14 | "files": [], 15 | "artifacts": {} 16 | } -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk-prototype-kit.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "nunjucksPaths": [ 3 | "/" 4 | ], 5 | "scripts": [ 6 | "/govuk/all.js" 7 | ], 8 | "assets": [ 9 | "/govuk/assets" 10 | ], 11 | "sass": [ 12 | "/govuk/all.scss" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/_base.scss: -------------------------------------------------------------------------------- 1 | @import "settings/all"; 2 | @import "tools/all"; 3 | @import "helpers/all"; 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/all-ie8.scss: -------------------------------------------------------------------------------- 1 | // By setting $govuk-is-ie8 to true, we create a version of the stylesheet that 2 | // targets IE8 – e.g. conditionally including or excluding styles, and 3 | // rasterizing media queries. 4 | $govuk-is-ie8: true; 5 | 6 | @import "all"; 7 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/all.scss: -------------------------------------------------------------------------------- 1 | @import "base"; 2 | 3 | @import "core/all"; 4 | @import "objects/all"; 5 | 6 | @import "components/all"; 7 | 8 | @import "utilities/all"; 9 | @import "overrides/all"; 10 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/fonts/bold-affa96571d-v2.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/fonts/bold-affa96571d-v2.woff -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2 -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/fonts/light-94a07e06a1-v2.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/fonts/light-94a07e06a1-v2.woff2 -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/fonts/light-f591b13f7d-v2.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/fonts/light-f591b13f7d-v2.woff -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/images/favicon.ico -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-167x167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-167x167.png -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/images/govuk-apple-touch-icon.png -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/images/govuk-crest-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/images/govuk-crest-2x.png -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/images/govuk-crest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/images/govuk-crest.png -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/images/govuk-logotype-crown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/images/govuk-logotype-crown.png -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/assets/images/govuk-opengraph-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/node_modules/govuk-frontend/govuk/assets/images/govuk-opengraph-image.png -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/accordion/README.md: -------------------------------------------------------------------------------- 1 | # Accordion 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the accordion component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/accordion). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/accordion/#options-accordion-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/accordion/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukAccordion(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/back-link/README.md: -------------------------------------------------------------------------------- 1 | # Back link 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the back link component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/back-link). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/back-link/#options-back-link-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/back-link/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukBackLink(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/back-link/template.njk: -------------------------------------------------------------------------------- 1 | {{ (params.html | safe if params.html else (params.text if params.text else 'Back')) }} 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/breadcrumbs/README.md: -------------------------------------------------------------------------------- 1 | # Breadcrumbs 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the breadcrumbs component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/breadcrumbs). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/breadcrumbs/#options-breadcrumbs-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/breadcrumbs/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukBreadcrumbs(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/button/README.md: -------------------------------------------------------------------------------- 1 | # Button 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the button component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/button). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/button/#options-button-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/button/_button.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/button/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukButton(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/character-count/README.md: -------------------------------------------------------------------------------- 1 | # Character count 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the character count component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/character-count). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/character-count/#options-character-count-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/character-count/_index.scss: -------------------------------------------------------------------------------- 1 | @import "../error-message/index"; 2 | @import "../hint/index"; 3 | @import "../label/index"; 4 | @import "../textarea/index"; 5 | 6 | @include govuk-exports("govuk/component/character-count") { 7 | .govuk-character-count { 8 | @include govuk-responsive-margin(6, "bottom"); 9 | 10 | .govuk-form-group, 11 | .govuk-textarea { 12 | margin-bottom: govuk-spacing(1); 13 | } 14 | } 15 | 16 | .govuk-character-count__message { 17 | @include govuk-font($size: false, $tabular: true); 18 | margin-top: 0; 19 | margin-bottom: 0; 20 | } 21 | 22 | .govuk-character-count__message--disabled { 23 | visibility: hidden; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/character-count/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukCharacterCount(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/checkboxes/README.md: -------------------------------------------------------------------------------- 1 | # Checkboxes 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the checkboxes component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/checkboxes). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/checkboxes/#options-checkboxes-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/checkboxes/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukCheckboxes(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/cookie-banner/README.md: -------------------------------------------------------------------------------- 1 | # Cookie banner 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the cookie banner component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/cookie-banner). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/cookie-banner/#options-default-cookie-banner-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/cookie-banner/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukCookieBanner(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/date-input/README.md: -------------------------------------------------------------------------------- 1 | # Date input 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the date input component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/date-input). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/date-input/#options-date-input-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/date-input/_index.scss: -------------------------------------------------------------------------------- 1 | @import "../error-message/index"; 2 | @import "../input/index"; 3 | @import "../hint/index"; 4 | @import "../label/index"; 5 | 6 | @include govuk-exports("govuk/component/date-input") { 7 | .govuk-date-input { 8 | @include govuk-clearfix; 9 | // font-size: 0 removes whitespace caused by inline-block 10 | font-size: 0; 11 | } 12 | 13 | .govuk-date-input__item { 14 | display: inline-block; 15 | margin-right: govuk-spacing(4); 16 | margin-bottom: 0; 17 | } 18 | 19 | .govuk-date-input__label { 20 | display: block; 21 | } 22 | 23 | .govuk-date-input__input { 24 | margin-bottom: 0; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/date-input/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukDateInput(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/details/README.md: -------------------------------------------------------------------------------- 1 | # Details 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the details component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/details). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/details/#options-details-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/details/_details.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/details/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukDetails(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/details/template.njk: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | {{ params.summaryHtml | safe if params.summaryHtml else params.summaryText }} 5 | 6 | 7 |
8 | {{ params.html | safe if params.html else params.text }} 9 |
10 |
11 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/error-message/README.md: -------------------------------------------------------------------------------- 1 | # Error message 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the error message component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/error-message). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/error-message/#options-error-message-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/error-message/_index.scss: -------------------------------------------------------------------------------- 1 | @include govuk-exports("govuk/component/error-message") { 2 | .govuk-error-message { 3 | @include govuk-font($size: 19, $weight: bold); 4 | 5 | display: block; 6 | margin-bottom: govuk-spacing(3); 7 | clear: both; 8 | 9 | color: $govuk-error-colour; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/error-message/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukErrorMessage(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/error-message/template.njk: -------------------------------------------------------------------------------- 1 | {% set visuallyHiddenText = params.visuallyHiddenText | default("Error") -%} 2 | 3 | 4 | {% if visuallyHiddenText %}{{ visuallyHiddenText }}: {% endif -%} 5 | {{ params.html | safe if params.html else params.text }} 6 | 7 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/error-summary/README.md: -------------------------------------------------------------------------------- 1 | # Error summary 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the error summary component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/error-summary). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/error-summary/#options-error-summary-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/error-summary/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukErrorSummary(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/fieldset/README.md: -------------------------------------------------------------------------------- 1 | # Fieldset 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the fieldset component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/fieldset). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/fieldset/#options-fieldset-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/fieldset/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukFieldset(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/file-upload/README.md: -------------------------------------------------------------------------------- 1 | # File upload 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the file upload component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/file-upload). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/file-upload/#options-file-upload-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/file-upload/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukFileUpload(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/footer/README.md: -------------------------------------------------------------------------------- 1 | # Footer 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the footer component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/footer). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/footer/#options-footer-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/footer/_footer.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/footer/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukFooter(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/header/README.md: -------------------------------------------------------------------------------- 1 | # Header 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the header component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/header). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/header/#options-header-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/header/_header.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/header/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukHeader(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/hint/README.md: -------------------------------------------------------------------------------- 1 | # Hint 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | The hint component is used in other input components. To see an example of it in use, see the [text input component](https://design-system.service.gov.uk/components/text-input/#hint-text). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/text-input/#options-text-input-example--hint) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/hint/_hint.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/hint/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukHint(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/hint/template.njk: -------------------------------------------------------------------------------- 1 |
3 | {{ params.html | safe if params.html else params.text }} 4 |
5 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/input/README.md: -------------------------------------------------------------------------------- 1 | # Input 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the input component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/text-input). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/text-input/#options-input-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/input/_input.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/input/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukInput(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/inset-text/README.md: -------------------------------------------------------------------------------- 1 | # Inset text 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the inset text component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/inset-text). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/inset-text/#options-inset-text-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss: -------------------------------------------------------------------------------- 1 | @include govuk-exports("govuk/component/inset-text") { 2 | .govuk-inset-text { 3 | @include govuk-font($size: 19); 4 | @include govuk-text-colour; 5 | padding: govuk-spacing(3); 6 | // Margin top intended to collapse 7 | // This adds an additional 10px to the paragraph above 8 | @include govuk-responsive-margin(6, "top"); 9 | @include govuk-responsive-margin(6, "bottom"); 10 | 11 | clear: both; 12 | 13 | border-left: $govuk-border-width-wide solid $govuk-border-colour; 14 | 15 | > :first-child { 16 | margin-top: 0; 17 | } 18 | 19 | > :only-child, 20 | > :last-child { 21 | margin-bottom: 0; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/inset-text/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukInsetText(params) %} 2 | {%- include './template.njk' -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/inset-text/template.njk: -------------------------------------------------------------------------------- 1 |
3 | {{ params.html | safe if params.html else params.text }} 4 |
5 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/label/README.md: -------------------------------------------------------------------------------- 1 | # Label 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | The label component is used in other input components. To see an example of it in use, see the [text input component](https://design-system.service.gov.uk/components/text-input/). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/text-input/#options-text-input-example--label) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/label/_label.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/label/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukLabel(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/label/template.njk: -------------------------------------------------------------------------------- 1 | {% if params.html or params.text %} 2 | {% set labelHtml %} 3 | 8 | {% endset %} 9 | 10 | {% if params.isPageHeading %} 11 |

{{ labelHtml | safe | indent(2) }}

12 | {% else %} 13 | {{ labelHtml | safe }} 14 | {% endif %} 15 | {% endif %} 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/notification-banner/README.md: -------------------------------------------------------------------------------- 1 | # Notification banner 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the notification banner component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/notification-banner). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/notification-banner/#options-notification-banner-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/notification-banner/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukNotificationBanner(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/panel/README.md: -------------------------------------------------------------------------------- 1 | # Panel 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the panel component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/panel). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/panel/#options-panel-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/panel/_panel.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/panel/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukPanel(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/panel/template.njk: -------------------------------------------------------------------------------- 1 | {% set headingLevel = params.headingLevel if params.headingLevel else 1 %} 2 |
5 | 6 | {{ params.titleHtml | safe if params.titleHtml else params.titleText }} 7 | 8 | {% if params.html or params.text %} 9 |
10 | {{ params.html | safe if params.html else params.text }} 11 |
12 | {% endif %} 13 |
14 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/phase-banner/README.md: -------------------------------------------------------------------------------- 1 | # Phase banner 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the phase banner component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/phase-banner). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/phase-banner/#options-phase-banner-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss: -------------------------------------------------------------------------------- 1 | @import "../tag/index"; 2 | 3 | @include govuk-exports("govuk/component/phase-banner") { 4 | .govuk-phase-banner { 5 | padding-top: govuk-spacing(2); 6 | padding-bottom: govuk-spacing(2); 7 | 8 | border-bottom: 1px solid $govuk-border-colour; 9 | } 10 | 11 | .govuk-phase-banner__content { 12 | @include govuk-font($size: 16); 13 | @include govuk-text-colour; 14 | 15 | display: table; 16 | margin: 0; 17 | } 18 | 19 | .govuk-phase-banner__content__tag { 20 | margin-right: govuk-spacing(2); 21 | } 22 | 23 | .govuk-phase-banner__text { 24 | display: table-cell; 25 | vertical-align: middle; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/phase-banner/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukPhaseBanner(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/phase-banner/template.njk: -------------------------------------------------------------------------------- 1 | {% from "../tag/macro.njk" import govukTag -%} 2 | 3 |
5 |

6 | {{ govukTag({ 7 | text: params.tag.text, 8 | html: params.tag.html, 9 | classes: "govuk-phase-banner__content__tag" + (" " + params.tag.classes if params.tag.classes) 10 | }) | indent(4) | trim }} 11 | 12 | {{ params.html | safe if params.html else params.text }} 13 | 14 |

15 |
16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/radios/README.md: -------------------------------------------------------------------------------- 1 | # Radios 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the radios component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/radios). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/radios/#options-radios-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/radios/_radios.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/radios/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukRadios(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/select/README.md: -------------------------------------------------------------------------------- 1 | # Select 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the select component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/select). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/select/#options-select-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/select/_select.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/select/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukSelect(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/skip-link/README.md: -------------------------------------------------------------------------------- 1 | # Skip link 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the skip link component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/skip-link). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/skip-link/#options-skip-link-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/skip-link/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukSkipLink(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/skip-link/template.njk: -------------------------------------------------------------------------------- 1 | 2 | {{- params.html | safe if params.html else params.text -}} 3 | 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/summary-list/README.md: -------------------------------------------------------------------------------- 1 | # Summary list 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the summary list component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/summary-list). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/summary-list/#options-summary-list-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/summary-list/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukSummaryList(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/table/README.md: -------------------------------------------------------------------------------- 1 | # Table 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the table component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/table). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/table/#options-table-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/table/_table.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/table/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukTable(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/tabs/README.md: -------------------------------------------------------------------------------- 1 | # Tabs 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the tabs component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/tabs). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/tabs/#options-tabs-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/tabs/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukTabs(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/tag/README.md: -------------------------------------------------------------------------------- 1 | # Tag 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the tag component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/tag). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/tag/#options-tag-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/tag/_tag.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/tag/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukTag(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/tag/template.njk: -------------------------------------------------------------------------------- 1 | 2 | {{ params.html | safe if params.html else params.text }} 3 | 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/textarea/README.md: -------------------------------------------------------------------------------- 1 | # Textarea 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the textarea component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/textarea). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/textarea/#options-textarea-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/textarea/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukTextarea(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/warning-text/README.md: -------------------------------------------------------------------------------- 1 | # Warning text 2 | 3 | ## Installation 4 | 5 | See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component. 6 | 7 | ## Guidance and Examples 8 | 9 | Find out when to use the warning text component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/warning-text). 10 | 11 | ## Component options 12 | 13 | Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. 14 | 15 | See [options table](https://design-system.service.gov.uk/components/warning-text/#options-warning-text-example) for details. 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss: -------------------------------------------------------------------------------- 1 | @import "../../base"; 2 | @import "./index"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/warning-text/macro.njk: -------------------------------------------------------------------------------- 1 | {% macro govukWarningText(params) %} 2 | {%- include "./template.njk" -%} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/components/warning-text/template.njk: -------------------------------------------------------------------------------- 1 |
4 | 5 | 6 | {{ params.iconFallbackText }} 7 | {{ params.html | safe if params.html else params.text }} 8 | 9 |
10 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/core/_all.scss: -------------------------------------------------------------------------------- 1 | @import "links"; 2 | @import "lists"; 3 | @import "template"; 4 | @import "typography"; 5 | @import "section-break"; 6 | @import "global-styles"; 7 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/core/_global-styles.scss: -------------------------------------------------------------------------------- 1 | @if not mixin-exists("govuk-exports") { 2 | @warn "Importing items from the core layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0."; 3 | } 4 | 5 | @import "../base"; 6 | 7 | @import "links"; 8 | @import "typography"; 9 | 10 | @mixin govuk-global-styles { 11 | a { 12 | @extend %govuk-link; 13 | } 14 | 15 | p { 16 | @extend %govuk-body-m; 17 | } 18 | } 19 | 20 | @include govuk-exports("govuk/core/global-styles") { 21 | 22 | @if $govuk-global-styles == true { 23 | @include govuk-global-styles; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/helpers/_all.scss: -------------------------------------------------------------------------------- 1 | @import "clearfix"; 2 | @import "colour"; 3 | @import "device-pixels"; 4 | @import "focused"; 5 | @import "font-faces"; 6 | @import "grid"; 7 | @import "links"; 8 | @import "media-queries"; 9 | @import "shape-arrow"; 10 | @import "spacing"; 11 | @import "typography"; 12 | @import "visually-hidden"; 13 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss: -------------------------------------------------------------------------------- 1 | //// 2 | /// @group helpers/layout 3 | //// 4 | 5 | /// Clear floated content within a container using a pseudo element 6 | /// 7 | /// @access public 8 | 9 | @mixin govuk-clearfix { 10 | &:after { 11 | content: ""; 12 | display: block; 13 | clear: both; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/objects/_all.scss: -------------------------------------------------------------------------------- 1 | @import "button-group"; 2 | @import "form-group"; 3 | @import "grid"; 4 | @import "main-wrapper"; 5 | @import "width-container"; 6 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/objects/_form-group.scss: -------------------------------------------------------------------------------- 1 | @import "../base"; 2 | 3 | @include govuk-exports("govuk/objects/form-group") { 4 | .govuk-form-group { 5 | @include govuk-clearfix; 6 | @include govuk-responsive-margin(6, "bottom"); 7 | 8 | .govuk-form-group:last-of-type { 9 | margin-bottom: 0; // Remove margin from last item in nested groups 10 | } 11 | } 12 | 13 | .govuk-form-group--error { 14 | padding-left: govuk-spacing(3); 15 | border-left: $govuk-border-width-form-group-error solid $govuk-error-colour; 16 | 17 | .govuk-form-group { 18 | // Reset error styles in nested form groups that might have error class 19 | padding: 0; 20 | border: 0; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/objects/_grid.scss: -------------------------------------------------------------------------------- 1 | @import "../base"; 2 | 3 | @include govuk-exports("govuk/objects/grid") { 4 | .govuk-grid-row { 5 | @include govuk-clearfix; 6 | margin-right: - ($govuk-gutter-half); 7 | margin-left: - ($govuk-gutter-half); 8 | } 9 | 10 | @each $width in map-keys($govuk-grid-widths) { 11 | .govuk-grid-column-#{$width} { 12 | @include govuk-grid-column($width); 13 | } 14 | } 15 | 16 | // These *must* be defined in a separate loop as they have the same 17 | // specificity as the non-breakpoint specific classes, so need to appear after 18 | // them in the outputted CSS 19 | @each $width in map-keys($govuk-grid-widths) { 20 | .govuk-grid-column-#{$width}-from-desktop { 21 | @include govuk-grid-column($width, $at: desktop); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/overrides/_all.scss: -------------------------------------------------------------------------------- 1 | @import "display"; 2 | @import "spacing"; 3 | @import "text-align"; 4 | @import "typography"; 5 | @import "width"; 6 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/overrides/_text-align.scss: -------------------------------------------------------------------------------- 1 | @if not mixin-exists("govuk-exports") { 2 | @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0."; 3 | } 4 | 5 | @import "../base"; 6 | 7 | // stylelint-disable declaration-no-important 8 | @include govuk-exports("govuk/overrides/text-align") { 9 | .govuk-\!-text-align-left { 10 | text-align: left !important; 11 | } 12 | 13 | .govuk-\!-text-align-centre { 14 | text-align: center !important; 15 | } 16 | 17 | .govuk-\!-text-align-right { 18 | text-align: right !important; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/settings/_all.scss: -------------------------------------------------------------------------------- 1 | // The order we import settings in is important, as some settings files rely on 2 | // others 3 | 4 | @import "assets"; 5 | 6 | @import "compatibility"; 7 | @import "global-styles"; 8 | @import "ie8"; 9 | 10 | @import "media-queries"; 11 | 12 | @import "colours-palette"; 13 | @import "colours-organisations"; 14 | @import "colours-applied"; 15 | 16 | @import "spacing"; 17 | @import "measurements"; 18 | 19 | @import "typography-font-families"; 20 | @import "typography-font"; 21 | @import "typography-responsive"; 22 | 23 | @import "links"; 24 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/settings/_global-styles.scss: -------------------------------------------------------------------------------- 1 | //// 2 | /// @group settings/global-styles 3 | //// 4 | 5 | /// Include 'global' styles 6 | /// 7 | /// Whether to style paragraphs (`

`) and links (``) without explicitly 8 | /// having to apply the `govuk-body` and `govuk-link` classes. 9 | /// 10 | /// @type Boolean 11 | /// @access public 12 | 13 | $govuk-global-styles: false !default; 14 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/settings/_ie8.scss: -------------------------------------------------------------------------------- 1 | //// 2 | /// @group settings/internet-explorer-8 3 | //// 4 | 5 | /// Whether the stylesheet being built is targeting Internet Explorer 8. 6 | /// 7 | /// @type Boolean 8 | /// @access public 9 | 10 | $govuk-is-ie8: false !default; 11 | 12 | /// The name of the breakpoint to use as the target when rasterizing media 13 | /// queries 14 | /// 15 | /// @type String 16 | /// @access public 17 | 18 | $govuk-ie8-breakpoint: desktop !default; 19 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/settings/_media-queries.scss: -------------------------------------------------------------------------------- 1 | //// 2 | /// @group settings/media-queries 3 | //// 4 | 5 | /// Breakpoint definitions 6 | /// 7 | /// @type Map 8 | /// @access public 9 | 10 | $govuk-breakpoints: ( 11 | mobile: 320px, 12 | tablet: 641px, 13 | desktop: 769px 14 | ) !default; 15 | 16 | /// Show active breakpoint in top-right corner. 17 | /// 18 | /// Only use this during local development. 19 | /// 20 | /// @type Boolean 21 | /// @access public 22 | 23 | $govuk-show-breakpoints: false !default; 24 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/tools/_all.scss: -------------------------------------------------------------------------------- 1 | @import "compatibility"; 2 | @import "exports"; 3 | @import "font-url"; 4 | @import "ie8"; 5 | @import "iff"; 6 | @import "image-url"; 7 | @import "px-to-em"; 8 | @import "px-to-rem"; 9 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/tools/_iff.scss: -------------------------------------------------------------------------------- 1 | //// 2 | /// @group tools 3 | //// 4 | 5 | /// Syntactic sugar around Sass' built-in `if` function that does not require 6 | /// you to pass a value for `$if-false`. 7 | /// 8 | /// @param {Boolean} $condition - Whether to return the value of `$if-true` 9 | /// @param {Mixed} $if-true - Value to return if `$condition` is truthy 10 | /// @return {Mixed} Value of `$if-true` if `$condition` is truthy, else null 11 | /// @access private 12 | /// @deprecated We will be removing this function in a future release, use `if($condition, $if-true, null);` instead. 13 | 14 | @function iff($condition, $if-true) { 15 | @warn "The `iff` function will be removed in a future release, use `if($condition, $if-true, null);` instead."; 16 | @return if($condition, $if-true, null); 17 | } 18 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss: -------------------------------------------------------------------------------- 1 | //// 2 | /// @group tools/unit-conversion 3 | //// 4 | 5 | /// Convert pixels to em 6 | /// 7 | /// @param {Number} $value - Length in pixels 8 | /// @param {Number} $context-font-size - Font size of element 9 | /// @return {Number} Length in ems 10 | /// @access public 11 | 12 | @function govuk-em($value, $context-font-size) { 13 | @if (unitless($value)) { 14 | $value: $value * 1px; 15 | } 16 | @if (unitless($context-font-size)) { 17 | $context-font-size: $context-font-size * 1px; 18 | } 19 | @return $value / $context-font-size * 1em; 20 | } 21 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss: -------------------------------------------------------------------------------- 1 | //// 2 | /// @group tools/unit-conversion 3 | //// 4 | 5 | /// Convert pixels to rem 6 | /// 7 | /// The $govuk-root-font-size (defined in settings/_typography-responsive.scss) 8 | /// must be configured to match the font-size of your root (html) element 9 | /// 10 | /// @param {Number} $value - Length in pixels 11 | /// @return {Number} Length in rems 12 | /// @access public 13 | 14 | @function govuk-px-to-rem($value) { 15 | @if (unitless($value)) { 16 | $value: $value * 1px; 17 | } 18 | 19 | @return $value / $govuk-root-font-size * 1rem; 20 | } 21 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/utilities/_all.scss: -------------------------------------------------------------------------------- 1 | @import "clearfix"; 2 | @import "visually-hidden"; 3 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/utilities/_clearfix.scss: -------------------------------------------------------------------------------- 1 | @include govuk-exports("govuk/utilities/clearfix") { 2 | .govuk-clearfix { 3 | @include govuk-clearfix; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /lib/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss: -------------------------------------------------------------------------------- 1 | @include govuk-exports("govuk/utilities/visually-hidden") { 2 | .govuk-visually-hidden { 3 | @include govuk-visually-hidden; 4 | } 5 | 6 | .govuk-visually-hidden-focusable { 7 | @include govuk-visually-hidden-focusable; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/originating_ip_store.rb: -------------------------------------------------------------------------------- 1 | require "request_store" 2 | module OriginatingIpStore 3 | UNDETERMINED_IP = "".freeze 4 | 5 | def self.store(request) 6 | originating_ip = request.headers.fetch("X-Forwarded-For") { UNDETERMINED_IP } 7 | RequestStore.store[:originating_ip] = originating_ip 8 | end 9 | 10 | def self.get 11 | RequestStore.store[:originating_ip] 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "govuk-frontend": { 6 | "version": "3.5.0", 7 | "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.5.0.tgz", 8 | "integrity": "sha512-4tNKgcChO1bMNsrTz2UsK4fDMmU9R87UDxy/KhKIMbnhsuJLVuArDveYLkZuUsZ6B3eaCbl5gmI8i/Q/Mi680A==" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "govuk-frontend": "^3.5.0" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /lib/piwik.rb: -------------------------------------------------------------------------------- 1 | require "uri" 2 | 3 | class Piwik 4 | attr_reader :url, :site_id 5 | 6 | def initialize(host, site_id) 7 | @enabled = host.present? 8 | if @enabled 9 | @url = URI.parse(host) 10 | end 11 | @site_id = site_id 12 | end 13 | 14 | def enabled? 15 | @enabled 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/prometheus.rb: -------------------------------------------------------------------------------- 1 | require "prometheus/api_request_reporter" 2 | require "prometheus/controller_action_reporter" 3 | require "prometheus/event_subscriber" 4 | require "prometheus/session_timeout_reporter" 5 | 6 | module Prometheus 7 | end 8 | -------------------------------------------------------------------------------- /lib/prometheus/api_request_reporter.rb: -------------------------------------------------------------------------------- 1 | module Prometheus 2 | class ApiRequestReporter 3 | def initialize(prometheus = Prometheus::Client.registry) 4 | @counter = prometheus.counter(:verify_frontend_api_request_total, docstring: "Number of API requests made", labels: [:method]) 5 | @summary = prometheus.summary(:verify_frontend_api_request_duration, docstring: "Summary of API request durations", labels: [:method]) 6 | end 7 | 8 | def report(_name, start, finish, _id, payload) 9 | @summary.observe(finish - start, labels: { method: payload[:method] }) 10 | @counter.increment(labels: { method: payload[:method] }) 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/prometheus/event_subscriber.rb: -------------------------------------------------------------------------------- 1 | module Prometheus 2 | class EventSubscriber 3 | def initialize(event_source) 4 | @event_source = event_source 5 | end 6 | 7 | def subscribe(filter, reporter) 8 | @event_source.subscribe filter do |*args| 9 | reporter.report(*args) 10 | end 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/prometheus/session_timeout_reporter.rb: -------------------------------------------------------------------------------- 1 | module Prometheus 2 | class SessionTimeoutReporter 3 | def initialize(prometheus = Prometheus::Client.registry) 4 | @counter = prometheus.counter(:verify_frontend_session_timeout_total, docstring: "Number of session timeouts", labels: %i(service idp)) 5 | @summary = prometheus.summary(:verify_frontend_session_timeout_minutes_ago, docstring: "Ago minutes when the session expired", labels: %i(service idp)) 6 | end 7 | 8 | def report(_name, _start, _finish, _id, payload) 9 | @summary.observe(payload[:minutes_ago], labels: { service: payload[:service], idp: payload[:idp] }) 10 | @counter.increment(labels: { service: payload[:service], idp: payload[:idp] }) 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/raven/processor/cookies.rb: -------------------------------------------------------------------------------- 1 | require "raven/processor" 2 | module Raven 3 | class Processor::Cookies < Processor 4 | def process(data) 5 | if data[:request] 6 | # Remove possibly sensitive cookies 7 | data[:request][:cookies] = nil if data[:request][:cookies] 8 | 9 | if data[:request][:headers] && data[:request][:headers]["Cookie"] 10 | data[:request][:headers]["Cookie"] = nil 11 | end 12 | end 13 | 14 | data 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/redirect_with_see_other.rb: -------------------------------------------------------------------------------- 1 | module RedirectWithSeeOther 2 | def redirect_to(options = {}, response_status = {}) 3 | response_status.reverse_merge! status: :see_other 4 | super options, response_status 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /lib/service_status.rb: -------------------------------------------------------------------------------- 1 | class ServiceStatus 2 | def self.unavailable? 3 | File.exist?(::CONFIG.zdd_file) 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /lib/service_status_filter.rb: -------------------------------------------------------------------------------- 1 | require "service_status" 2 | class ServiceStatusFilter 3 | def initialize(app) 4 | @app = app 5 | end 6 | 7 | def call(env) 8 | status, headers, response = @app.call(env) 9 | if ServiceStatus.unavailable? 10 | [status, headers.merge("Connection" => "close"), response] 11 | else 12 | [status, headers, response] 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/ssl_context_factory.rb: -------------------------------------------------------------------------------- 1 | class SSLContextFactory 2 | def create_context 3 | OpenSSL::SSL::SSLContext.new.tap do |context| 4 | context.set_params(ssl_version: :TLSv1_2) 5 | context.ciphers = %w(DHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-GCM-SHA256) 6 | context.verify_mode = OpenSSL::SSL::VERIFY_NONE 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /lib/store_session_id.rb: -------------------------------------------------------------------------------- 1 | class StoreSessionId 2 | def initialize(app) 3 | @app = app 4 | end 5 | 6 | def call(env) 7 | request = ActionDispatch::Request.new env 8 | session_id = request.cookies[CookieNames::SESSION_ID_COOKIE_NAME] 9 | RequestStore.store[:session_id] = session_id 10 | Raven.user_context(session_id: session_id) 11 | @app.call(env) 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/lib/tasks/.keep -------------------------------------------------------------------------------- /lib/tasks/zdd.rake: -------------------------------------------------------------------------------- 1 | require "fileutils" 2 | namespace :zdd do 3 | desc "set the service unavailable" 4 | task :set_unavailable do 5 | FileUtils.touch(RakeZdd.zdd_file) 6 | sleep Integer(RakeZdd.wait_time) 7 | end 8 | 9 | desc "reset service availability" 10 | task :reset do 11 | FileUtils.rm(RakeZdd.zdd_file, force: true) 12 | end 13 | end 14 | 15 | class RakeZdd 16 | class << RakeZdd 17 | def zdd_file 18 | ENV.fetch("ZDD_LATCH") { 19 | raise "ZDD_LATCH environment variable is unset!" 20 | } 21 | end 22 | 23 | def wait_time 24 | ENV.fetch("POLLING_WAIT_TIME") { 25 | raise "POLLING_WAIT_TIME environment variable is unset!" 26 | } 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/verify_form_builder.rb: -------------------------------------------------------------------------------- 1 | class VerifyFormBuilder < ActionView::Helpers::FormBuilder 2 | # Our custom radio / checkbox implementation 3 | def custom_radio_button key, value, text, attributes = {} 4 | input = radio_button key, value, attributes 5 | label = label "#{key}_#{value.to_s.parameterize}", text 6 | "

#{input} #{label}
".html_safe 7 | end 8 | 9 | def custom_check_box key, attributes, true_value, false_value, text 10 | input = check_box key, attributes, true_value, false_value 11 | label = label key, text 12 | "
#{input} #{label}
".html_safe 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/yaml_loader.rb: -------------------------------------------------------------------------------- 1 | require "yaml" 2 | 3 | class YamlLoader 4 | def load(path) 5 | load_with_id(path).values 6 | end 7 | 8 | def load_with_id(path) 9 | files = File.join(path, "*.yml") 10 | loaded_files = Dir.glob(files).map do |file| 11 | [File.basename(file, ".yml"), YAML.load_file(file)] 12 | end 13 | loaded_files.to_h 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | govuk-frontend@^3.5.0: 6 | version "3.14.0" 7 | resolved "https://registry.yarnpkg.com/govuk-frontend/-/govuk-frontend-3.14.0.tgz#d3a9c54437c08f5188f87b1f4480ba60e95c8eb6" 8 | integrity sha512-y7FTuihCSA8Hty+e9h0uPhCoNanCAN+CLioNFlPmlbeHXpbi09VMyxTcH+XfnMPY4Cp++7096v0rLwwdapTXnA== 9 | -------------------------------------------------------------------------------- /lib/zendesk_client.rb: -------------------------------------------------------------------------------- 1 | require "zendesk_api" 2 | 3 | class ZendeskClient 4 | def initialize(client, logger) 5 | @client = client 6 | @logger = logger 7 | end 8 | 9 | def submit(session_id, ticket) 10 | ticket_created = @client.tickets.create!(ticket) 11 | session_id = session_id.nil? ? "session-cookie-is-null-or-invalid" : session_id 12 | @logger.info("Feedback sent for session id #{session_id}, zendesk with ticket id #{ticket_created.id}") 13 | true 14 | rescue ZendeskAPI::Error::ClientError => e 15 | # If there are multiple connect timeout / network errors when sending feedback, try checking 16 | # https://support.zendesk.com/hc/en-us/articles/203660846-Zendesk-Public-IP-addresses 17 | # and check the listed IPs there are whitelisted on our environments. 18 | @logger.error(e) 19 | false 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /log/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/log/.keep -------------------------------------------------------------------------------- /packaging/postinst.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -eu 2 | 3 | mkdir -p /ida 4 | [ ! -L /ida/front ] && ln -s /opt/front /ida/front 5 | 6 | # We manage service restarts via the meta package 7 | ln -fs /opt/front/upstart/front.conf /etc/init/front.conf 8 | 9 | ln -fs /opt/front/conf.d/zdd_latch.conf /etc/front/conf.d/zdd_latch.conf 10 | 11 | # We want to ensure upstart realizes it's config may have changed. 12 | /sbin/initctl reload-configuration 13 | 14 | chown -R deployer:deployer /opt/front/log 15 | chown -R deployer:deployer /var/log/front 16 | chown -R deployer:deployer /opt/front/tmp 17 | chgrp deployer /etc/front 18 | 19 | # deployer needs to access to all those files under bundle which are owned by root 20 | find /opt/front/vendor/bundle \( -type d -exec chmod go+rx {} \; \) , \( -type f -exec chmod go+r {} \; \) 21 | -------------------------------------------------------------------------------- /packaging/postrm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -eu 2 | 3 | if [ -e /etc/init/front.conf ]; then 4 | rm -f /etc/init/front.conf 5 | fi 6 | -------------------------------------------------------------------------------- /pre-commit-docker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | docker build . -t frontend-pre-commit 3 | docker run -t frontend-pre-commit ./pre-commit.sh -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/favicon.ico -------------------------------------------------------------------------------- /public/googlee6ac195426fef3bb.html: -------------------------------------------------------------------------------- 1 | google-site-verification: googlee6ac195426fef3bb.html -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-agent: * 5 | # Disallow: / 6 | 7 | # Explicitly allow all pages to be accessed by crawlers 8 | User-agent: * 9 | Disallow: 10 | Allow: / 11 | -------------------------------------------------------------------------------- /public/stub-logos/stub-idp-demo-one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/stub-idp-demo-one.png -------------------------------------------------------------------------------- /public/stub-logos/stub-idp-demo-two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/stub-idp-demo-two.png -------------------------------------------------------------------------------- /public/stub-logos/stub-idp-disconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/stub-idp-disconnected.png -------------------------------------------------------------------------------- /public/stub-logos/stub-idp-four.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/stub-idp-four.png -------------------------------------------------------------------------------- /public/stub-logos/stub-idp-loa1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/stub-idp-loa1.png -------------------------------------------------------------------------------- /public/stub-logos/stub-idp-no-docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/stub-idp-no-docs.png -------------------------------------------------------------------------------- /public/stub-logos/stub-idp-one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/stub-idp-one.png -------------------------------------------------------------------------------- /public/stub-logos/stub-idp-three.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/stub-idp-three.png -------------------------------------------------------------------------------- /public/stub-logos/stub-idp-two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/stub-idp-two.png -------------------------------------------------------------------------------- /public/stub-logos/stub-idp-unavailable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/stub-idp-unavailable.png -------------------------------------------------------------------------------- /public/stub-logos/stub-idp-zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/stub-idp-zero.png -------------------------------------------------------------------------------- /public/stub-logos/white/barclays.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/barclays.png -------------------------------------------------------------------------------- /public/stub-logos/white/digidentity-pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/digidentity-pre.png -------------------------------------------------------------------------------- /public/stub-logos/white/digidentity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/digidentity.png -------------------------------------------------------------------------------- /public/stub-logos/white/experian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/experian.png -------------------------------------------------------------------------------- /public/stub-logos/white/headless-idp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/headless-idp.png -------------------------------------------------------------------------------- /public/stub-logos/white/post-office-pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/post-office-pre.png -------------------------------------------------------------------------------- /public/stub-logos/white/post-office-stub.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/post-office-stub.png -------------------------------------------------------------------------------- /public/stub-logos/white/post-office.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/post-office.png -------------------------------------------------------------------------------- /public/stub-logos/white/secureidentity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/secureidentity.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-demo-one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-demo-one.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-demo-three.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-demo-three.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-demo-two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-demo-two.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-disconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-disconnected.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-four.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-four.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-loa1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-loa1.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-no-docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-no-docs.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-one.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-three.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-three.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-two.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-unavailable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-unavailable.png -------------------------------------------------------------------------------- /public/stub-logos/white/stub-idp-zero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/public/stub-logos/white/stub-idp-zero.png -------------------------------------------------------------------------------- /spec/constraints/ab_test_constraint_spec.rb: -------------------------------------------------------------------------------- 1 | require "rails_helper" 2 | require "spec_helper" 3 | 4 | describe AbTestConstraint do 5 | let(:ab_test_constraint) { AbTestConstraint.configure(ab_test_name: "Experiment", experiment_loa: "LEVEL_2") } 6 | it "returns new the ab_test constraint" do 7 | expect(ab_test_constraint).to eql subject 8 | end 9 | context "Experiment" do 10 | it "can create an alternative with a given value" do 11 | selected_route = ab_test_constraint.use(alternative: "one") 12 | expect(selected_route.class).to eql SelectRoute 13 | expect(selected_route.experiment_name).to eql "Experiment" 14 | expect(selected_route.experiment_loa).to eql "LEVEL_2" 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/controllers/feedback_controller_spec.rb: -------------------------------------------------------------------------------- 1 | require "rails_helper" 2 | require "controller_helper" 3 | 4 | describe FeedbackController do 5 | subject { get :index, params: { locale: "en" } } 6 | 7 | context "when feedback flag is true" do 8 | before(:each) do stub_const("FEEDBACK_DISABLED", true) end 9 | 10 | it "renders feedback disabled view" do 11 | expect(subject).to render_template(:disabled) 12 | end 13 | end 14 | 15 | context "when feedback flag is not present" do 16 | it "renders feedback form" do 17 | expect(subject).to render_template(:index) 18 | end 19 | end 20 | 21 | context "when feedback flag is false" do 22 | before(:each) do stub_const("FEEDBACK_DISABLED", false) end 23 | it "renders feedback form" do 24 | expect(subject).to render_template(:index) 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /spec/features/redirects_with_see_other_spec.rb: -------------------------------------------------------------------------------- 1 | require "feature_helper" 2 | require "api_test_helper" 3 | describe "pages redirect with see other", type: :request do 4 | it "sets a see other for redirects" do 5 | stub_session_creation 6 | post "/SAML2/SSO", params: { "SAMLRequest" => "my-saml-request", "RelayState" => "my-relay-state" } 7 | expect(response.status).to eql 303 8 | end 9 | 10 | # HUB-113: Temporarily disabling to allow the perf team to analyze the data 11 | # it 'does not delete the new_visit flag' do 12 | # stub_session_creation 13 | # post '/SAML2/SSO', params: { 'SAMLRequest' => 'my-saml-request', 'RelayState' => 'my-relay-state' } 14 | # expect(request.session['new_visit']).to eql true 15 | # end 16 | end 17 | -------------------------------------------------------------------------------- /spec/features/service_set_unavailable_spec.rb: -------------------------------------------------------------------------------- 1 | require "feature_helper" 2 | 3 | describe "service reports the on service status", type: :request do 4 | it "is OK when ZDD_LATCH doesn't exist" do 5 | response = get("/service-status") 6 | expect(response).to eql 200 7 | end 8 | 9 | it "is not OK when ZDD_LATCH does exist" do 10 | file = Tempfile.new("zdd_file") 11 | expect(CONFIG).to receive(:zdd_file).twice.and_return(file.path) 12 | response = get("/service-status") 13 | expect(response).to eql 503 14 | expect(@response.headers["Connection"]).to eql "close" 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /spec/features/user_encounters_a_404_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "rails_helper" 3 | 4 | describe "User encounters an unknown page" do 5 | it "will render the 404 page" do 6 | visit "/404" 7 | expect(current_path).to eql "/404" 8 | expect(page).to have_content t("errors.page_not_found.heading") 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /spec/features/user_visits_accessibility_page_spec.rb: -------------------------------------------------------------------------------- 1 | require "feature_helper" 2 | 3 | RSpec.describe "When the user visits the accessibility page" do 4 | it "displays the page in English" do 5 | visit "/accessibility" 6 | expect(page).to have_title t("hub.accessibility.heading") 7 | expect(page).to have_content "We want as many people as possible to be able to use this website" 8 | expect(page).to have_content "Reporting accessibility problems with this website" 9 | end 10 | 11 | it "includes the appropriate feedback source" do 12 | visit "/accessibility" 13 | expect_feedback_source_to_be(page, "ACCESSIBILITY_PAGE", "/accessibility") 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /spec/features/user_visits_humanstxt_spec.rb: -------------------------------------------------------------------------------- 1 | require "feature_helper" 2 | 3 | RSpec.describe "user visits humans.txt" do 4 | it "will tell humans how to work at GOV.UK Verify" do 5 | visit("/humans.txt") 6 | 7 | expect(page.body).to eql "GOV.UK Verify is built by a team at the Government Digital Service in London. If you'd like to join us, see https://identityassurance.blog.gov.uk/work-with-us/" 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/features/user_visits_rp_single_idp_start_page_spec.rb: -------------------------------------------------------------------------------- 1 | require "feature_helper" 2 | require "api_test_helper" 3 | require "cookie_names" 4 | 5 | RSpec.describe "When the user visits the start page" do 6 | it "will display the start page in English" do 7 | stub_transactions_list 8 | stub_translations 9 | visit "/single-start/test-rp" 10 | expect(page).to have_content "This is the Single IDP Start Page Content" 11 | expect(page).to have_link "Sign In", href: "http://localhost:50130/success?rp-name=test-rp" 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/features/user_visits_verify_services_picker_page_spec.rb: -------------------------------------------------------------------------------- 1 | require "feature_helper" 2 | require "api_test_helper" 3 | 4 | RSpec.describe "When the user visits the Verify services picker page" do 5 | it "should display the page in English " do 6 | stub_transactions_list 7 | visit "/verify-services" 8 | expect(page).to have_content t("hub.verify_services.message") 9 | end 10 | 11 | it "should display the page in Welsh" do 12 | stub_transactions_list 13 | visit "/gwasanaethau-verify" 14 | expect(page).to have_content t("hub.verify_services.message", locale: :cy) 15 | end 16 | 17 | it "should include the appropriate feedback source" do 18 | stub_transactions_list 19 | visit "/verify-services" 20 | expect_feedback_source_to_be(page, "VERIFY_SERVICES_PAGE", "/verify-services") 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /spec/lib/google_analytics_spec.rb: -------------------------------------------------------------------------------- 1 | require "google_analytics" 2 | require "active_support/core_ext/string" 3 | 4 | RSpec.describe GoogleAnalytics do 5 | it "has an account id" do 6 | ga = GoogleAnalytics.new("UA-123456-1", []) 7 | expect(ga.tracker_id).to eql "UA-123456-1" 8 | end 9 | 10 | it "is disabled when account ID is nil" do 11 | ga = GoogleAnalytics.new(nil, []) 12 | expect(ga.enabled?).to eql false 13 | end 14 | 15 | it "is disabled when account ID is an empty string" do 16 | ga = GoogleAnalytics.new("", []) 17 | expect(ga.enabled?).to eql false 18 | end 19 | 20 | it "is enabled when account ID is present" do 21 | ga = GoogleAnalytics.new("UA-123456-1", []) 22 | expect(ga.enabled?).to eql true 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /spec/lib/metrics/api_request_reporter_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "metrics" 3 | require "metrics/api_request_reporter" 4 | 5 | module Metrics 6 | describe ApiRequestReporter do 7 | let(:statsd) { double(:statsd) } 8 | let(:reporter) { ApiRequestReporter.new(statsd) } 9 | 10 | it "should send total duration of event" do 11 | payload = { path: "/endpoint", method: "get" } 12 | duration = 0.060 13 | start = Time.now 14 | finish = start + duration 15 | expect(statsd).to receive(:timing).with("Api.request.get.total_duration", duration * 1_000) 16 | expect(statsd).to receive(:increment).with("Api.request.get.count") 17 | reporter.report("event_name", start, finish, "notification_id", payload) 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/lib/metrics/event_subscriber_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "metrics/event_subscriber" 3 | 4 | module Metrics 5 | describe EventSubscriber do 6 | let(:reporter) { double(:reporter) } 7 | let(:event_source) { double(:event_source) } 8 | 9 | it "should subscribe to specific events from an events source" do 10 | expect(event_source).to receive(:subscribe).with("filter") 11 | event_subscriber = EventSubscriber.new(event_source) 12 | event_subscriber.subscribe("filter", reporter) 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /spec/lib/originating_ip_store_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "originating_ip_store" 3 | 4 | describe OriginatingIpStore do 5 | it "should store the originating ip from request headers" do 6 | request = double(:request) 7 | expect(request).to receive(:headers).and_return("X-Forwarded-For" => "my thing") 8 | OriginatingIpStore.store(request) 9 | expect(OriginatingIpStore.get).to eql "my thing" 10 | end 11 | 12 | it "should store a default value if the header is not present" do 13 | request = double(:request) 14 | expect(request).to receive(:headers).and_return({}) 15 | OriginatingIpStore.store(request) 16 | expect(OriginatingIpStore.get).to eql OriginatingIpStore::UNDETERMINED_IP 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /spec/lib/prometheus/event_subscriber_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "prometheus/event_subscriber" 3 | 4 | module Prometheus 5 | describe EventSubscriber do 6 | let(:reporter) { double(:reporter) } 7 | let(:event_source) { double(:event_source) } 8 | 9 | it "should subscribe to specific events from an events source" do 10 | expect(event_source).to receive(:subscribe).with("filter") 11 | event_subscriber = EventSubscriber.new(event_source) 12 | event_subscriber.subscribe("filter", reporter) 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /spec/lib/service_status_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "tempfile" 3 | require "service_status" 4 | describe ServiceStatus do 5 | it "is availble when zdd file doesn't exist" do 6 | file = Tempfile.new 7 | path = file.path 8 | file.unlink 9 | stub_const("CONFIG", double(:config, zdd_file: path)) 10 | expect(ServiceStatus.unavailable?).to eql false 11 | end 12 | 13 | it "is availble when zdd file does exist" do 14 | file = Tempfile.new 15 | path = file.path 16 | stub_const("CONFIG", double(:config, zdd_file: path)) 17 | expect(ServiceStatus.unavailable?).to eql true 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/lib/store_session_id_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "store_session_id" 3 | require "rails_helper" 4 | require "raven" 5 | 6 | describe StoreSessionId do 7 | it "reads the session cookie from the users" do 8 | session_id = "foobarbaz" 9 | env = { 10 | "HTTP_COOKIE" => "#{CookieNames::SESSION_ID_COOKIE_NAME}=#{session_id};", 11 | } 12 | app = double(:app) 13 | expect(app).to receive(:call).with(env) 14 | StoreSessionId.new(app).call(env) 15 | expect(RequestStore.store[:session_id]).to eql session_id 16 | expect(Raven.context.user[:session_id]).to eql session_id 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /spec/logger_helper.rb: -------------------------------------------------------------------------------- 1 | def stub_logger 2 | logger = double(:logger) 3 | rails_double = double(:rails, logger: logger) 4 | stub_const("Rails", rails_double) 5 | logger 6 | end 7 | -------------------------------------------------------------------------------- /spec/mock_piwik_middleware.rb: -------------------------------------------------------------------------------- 1 | class MockPiwikMiddleware 2 | def call(env) 3 | request = ActionDispatch::Request.new(env) 4 | if request.path == "/piwik.php" 5 | params = request.params 6 | MockPiwikMiddleware.request_log.log(params) 7 | end 8 | ["200", {}, [""]] 9 | end 10 | 11 | def self.request_log; end 12 | end 13 | -------------------------------------------------------------------------------- /spec/models/cycle_three_attribute_response_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "rails_helper" 3 | 4 | describe CycleThreeAttributeResponse do 5 | it "is invalid when name is not present" do 6 | cycle_three_attribute_response = CycleThreeAttributeResponse.new({}) 7 | expect(cycle_three_attribute_response).to_not be_valid 8 | expect(cycle_three_attribute_response.errors.full_messages).to include "Name can't be blank" 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /spec/models/display/cycle_three_display_data_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "display_data_examples" 3 | require "display/display_data" 4 | 5 | module Display 6 | describe CycleThreeDisplayData do 7 | %i[ 8 | intro_html 9 | name 10 | field_name 11 | help_to_find 12 | example 13 | ].each do |field| 14 | include_examples "has content", field, CycleThreeDisplayData 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/models/display/idp_display_data_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "display_data_examples" 3 | require "display/display_data" 4 | require "display/idp_display_data" 5 | 6 | module Display 7 | describe IdpDisplayData do 8 | %i[ 9 | name 10 | about 11 | requirements 12 | contact_details 13 | ].each do |field| 14 | include_examples "has content", field, IdpDisplayData 15 | end 16 | 17 | %i[ 18 | tagline 19 | special_no_docs_instructions_html 20 | no_docs_requirement 21 | ].each do |field| 22 | include_examples "has content with default", field, IdpDisplayData 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /spec/models/display/rp_display_data_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "rails_helper" 3 | require "display_data_examples" 4 | require "display/display_data" 5 | require "display/rp_display_data" 6 | 7 | module Display 8 | describe RpDisplayData do 9 | %i[ 10 | other_ways_description 11 | name 12 | rp_name 13 | other_ways_text 14 | tailored_text 15 | ].each do |field| 16 | include_examples "has content", field, RpDisplayData 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/models/identity_provider_request_spec.rb: -------------------------------------------------------------------------------- 1 | require "rails_helper" 2 | 3 | RSpec.describe IdentityProviderRequest, skip_before: true do 4 | it "should wrap a saml request" do 5 | saml_message = OutboundSamlMessage.new( 6 | "postEndpoint" => "some_location", 7 | "samlMessage" => "some_request", 8 | "relayState" => "some_state", 9 | "registration" => "some_reg", 10 | ) 11 | 12 | request = IdentityProviderRequest.new(saml_message) 13 | 14 | expect(request.location).to eql("some_location") 15 | expect(request.saml_request).to eql("some_request") 16 | expect(request.relay_state).to eql("some_state") 17 | expect(request.registration).to eql("some_reg") 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/models/idp_list_response_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "rails_helper" 3 | 4 | describe IdpListResponse do 5 | it "is invalid when idps aren't valid" do 6 | federation = IdpListResponse.new([{}]) 7 | expect(federation).to_not be_valid 8 | expect(federation.errors.full_messages).to include "Identity providers are malformed" 9 | end 10 | 11 | it "can be valid with an empty list of idps" do 12 | federation = IdpListResponse.new([]) 13 | federation.valid? 14 | expect(federation.errors.full_messages).to_not include "Identity providers are malformed" 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /spec/models/matching_outcome_response_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "rails_helper" 3 | 4 | describe MatchingOutcomeResponse do 5 | it "should be invalid with an unknown outcome value" do 6 | expect(MatchingOutcomeResponse.new("responseProcessingStatus" => "BANANA").valid?).to eql(false) 7 | end 8 | 9 | it "should be valid with an expected outcome value" do 10 | expect(MatchingOutcomeResponse.new("responseProcessingStatus" => "WAIT").valid?).to eql(true) 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /spec/models/select_idp_response_spec.rb: -------------------------------------------------------------------------------- 1 | require "spec_helper" 2 | require "rails_helper" 3 | require "models/select_idp_response" 4 | 5 | describe SelectIdpResponse do 6 | it "needs all attributes" do 7 | message = SelectIdpResponse.new({}) 8 | expect(message.valid?).to be false 9 | expect(message.errors.full_messages).to contain_exactly("Encrypted entity can't be blank") 10 | end 11 | 12 | it "is valid when all attributes are present" do 13 | hash = { 14 | "encryptedEntityId" => "an-entity-id", 15 | } 16 | message = SelectIdpResponse.new(hash) 17 | expect(message).to be_valid 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/support/cookie_matchers.rb: -------------------------------------------------------------------------------- 1 | RSpec::Matchers.define :have_a_signed_value_of do |expected| 2 | match do |actual| 3 | cookie = CGI.unescape(actual) 4 | config = Rails.application.config 5 | secrets = Rails.application.secrets 6 | 7 | encrypted_signed_cookie_salt = config.action_dispatch.signed_cookie_salt # "signed encrypted cookie" by default 8 | 9 | key_generator = ActiveSupport::KeyGenerator.new(secrets.secret_key_base, iterations: 1000) 10 | sign_secret = key_generator.generate_key(encrypted_signed_cookie_salt) 11 | 12 | serializer = ActionDispatch::Cookies::JsonSerializer 13 | 14 | verifier = ActiveSupport::MessageVerifier.new(sign_secret, serializer: serializer) 15 | expected == verifier.verify(cookie) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/support/list_size_matcher.rb: -------------------------------------------------------------------------------- 1 | RSpec::Matchers.define :a_list_of_size do |x| 2 | match { |actual| actual.length == x } 3 | end 4 | -------------------------------------------------------------------------------- /spec/support/model_examples.rb: -------------------------------------------------------------------------------- 1 | RSpec.shared_examples "delegates to display_data" do |field, klass| 2 | describe "##{field}" do 3 | it "returns the display_data #{field}" do 4 | display_data = double(:display_data) 5 | expected = "hi" 6 | expect(display_data).to receive(field).and_return expected 7 | 8 | subject = Class.new(klass) do 9 | define_singleton_method(:display_data) do 10 | display_data 11 | end 12 | end 13 | 14 | expect(subject.new({}).public_send(field)).to eql expected 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/support/will_it_work_for_me_examples.rb: -------------------------------------------------------------------------------- 1 | require "piwik_test_helper" 2 | 3 | shared_examples "will_it_work_for_me" do |test_context, form_answer_description, form_variables, redirect_path| 4 | before(:each) do 5 | set_session_and_cookies_with_loa("LEVEL_1") 6 | set_selected_idp("entity_id" => "http://idcorp.com", "simple_id" => "stub-idp-one", "levels_of_assurance" => %w(LEVEL_1 LEVEL_2)) 7 | end 8 | 9 | context test_context do 10 | subject { post :will_it_work_for_me, params: { locale: "en", will_it_work_for_me_form: form_variables } } 11 | it "should redirect to #{redirect_path} on #{form_answer_description}" do 12 | expect(subject).to redirect_to(send(redirect_path)) 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /startup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | cd "$(dirname "$0")" 5 | 6 | ./kill-service.sh 7 | 8 | RUN_IN_BACKGROUND=true 9 | if ! [ -d tmp ]; then mkdir tmp; fi 10 | 11 | if [ "$1" == '--stub-api' ]; then 12 | echo "Starting stub-api server on port 50199" 13 | unset RUN_IN_BACKGROUND 14 | export CONFIG_API_HOST=http://localhost:50199 15 | export POLICY_HOST=http://localhost:50199 16 | export SAML_PROXY_HOST=http://localhost:50199 17 | ( 18 | export BUNDLE_GEMFILE=stub/api/Gemfile 19 | bundle check || bundle install 20 | bundle exec rackup --daemonize --port 50199 --pid tmp/stub_api.pid stub/api/stub_api_conf.ru 21 | ) 22 | fi 23 | 24 | bundle check || bundle install 25 | eval bundle exec puma -e development -p 50300 ${RUN_IN_BACKGROUND:+&} 26 | -------------------------------------------------------------------------------- /stub/api/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | ruby '2.7.6' 3 | gem 'sinatra', '~> 2.2.3', require: false 4 | 5 | group :test do 6 | gem 'activemodel', '~> 5.2.4' 7 | gem 'rspec', '~> 3.10' 8 | gem 'rack-test' 9 | gem 'codacy-coverage', :require => false 10 | end 11 | -------------------------------------------------------------------------------- /stub/api/stub_api_conf.ru: -------------------------------------------------------------------------------- 1 | Dir.chdir(File.dirname(__FILE__)) 2 | $LOAD_PATH << File.dirname(__FILE__) 3 | require 'stub_api' 4 | 5 | run StubApi 6 | -------------------------------------------------------------------------------- /stub/attributes/DrivingLicenceNumber.yml: -------------------------------------------------------------------------------- 1 | name: DrivingLicenceNumber 2 | pattern: "\\s*(([A-Za-z]{1}[9]{4}|[A-Za-z]{2}[9]{3}|[A-Za-z]{3}[9]{2}|[A-Za-z]{4}[9]{1}|[A-Za-z]{5})([0-9]{6})([A-Za-z]{1}[0-9]{2}|[A-Za-z]{2}[0-9]{1}|[A-Za-z]{3}|)([A-Za-z0-9]{2}))\\s*([0-9]{2})?\\s*" 3 | length: 16 -------------------------------------------------------------------------------- /stub/attributes/NationalInsuranceNumber.yml: -------------------------------------------------------------------------------- 1 | name: NationalInsuranceNumber 2 | pattern: '^(([AEHJLOR-SW-Yaehjlor-sw-y]|([Bb](?![Gg]))|([Cc](?![Rr]))|([Gg](?![Bb]))|([Kk](?![Nn]))|([Mm](?![Ww]))|([Nn](?![CKTckt]))|([Pp](?![PYZpyz]))|([Tt](?![Nn]))|([Zz](?![Zz])))[A-CEGHJ-NPR-TW-Za-ceghj-npr-tw-z][0-9]{6}[ABCDabcd])$' 3 | -------------------------------------------------------------------------------- /stub/attributes/NullableAttribute.yml: -------------------------------------------------------------------------------- 1 | name: NullableAttribute 2 | pattern: "\\d{8,9}" 3 | nullable: true -------------------------------------------------------------------------------- /stub/locales/cycle3/DrivingLicenceNumber.yml: -------------------------------------------------------------------------------- 1 | en: 2 | cycle3: 3 | DrivingLicenceNumber: 4 | intro_html:

Now we need to link your identity to your Driving License.

5 | name: driving licence number 6 | field_name: Driving licence number 7 | help_to_find: | 8 |

Your driving licence number can be found in section 5 of your driving licence photocard

9 | example: MORGA657054SM9IJ -------------------------------------------------------------------------------- /stub/locales/cycle3/NationalInsuranceNumber.yml: -------------------------------------------------------------------------------- 1 | en: 2 | cycle3: 3 | NationalInsuranceNumber: 4 | name: NINO 5 | field_name: National Insurance number(NINO) 6 | help_to_find: | 7 |

Your National Insurance number can be found on

8 | 15 | 16 | example: QQ123456C 17 | -------------------------------------------------------------------------------- /stub/locales/cycle3/NullableAttribute.yml: -------------------------------------------------------------------------------- 1 | en: 2 | cycle3: 3 | NullableAttribute: 4 | name: nullable attribute 5 | field_name: Nullable attribute 6 | help_to_find: | 7 |

Your nullable attribute is always null!

8 | example: foo bar baz -------------------------------------------------------------------------------- /stub/locales/idps/stub-idp-demo-two.yml: -------------------------------------------------------------------------------- 1 | en: 2 | idps: 3 | stub-idp-demo-two: 4 | name: "Stub IDP Demo Two" 5 | about: | 6 |

Stub Idp Demo Two Content

7 | requirements: 8 | - a UK passport 9 | contact_details: | 10 |

No contact details available

11 | cy: 12 | idps: 13 | stub-idp-demo-two: 14 | name: "Welsh Stub IDP Demo Two" 15 | about: | 16 |

ID Corp is the premier identity proofing service around.

17 | 21 | requirements: 22 | - a UK passport 23 | contact_details: | 24 | 5 Somewhere Avenue 25 | -------------------------------------------------------------------------------- /stub/locales/idps/stub-idp-loa1.yml: -------------------------------------------------------------------------------- 1 | en: 2 | idps: 3 | stub-idp-loa1: 4 | name: "LOA1 Corp" 5 | about: "

LOA1 Corp is the premier identity proofing service around. Come get some.

" 6 | requirements: 7 | - a UK passport 8 | - a UK photocard driving licence 9 | contact_details: | 10 | 5 Somewhere Avenue 11 | cy: 12 | idps: 13 | stub-idp-loa1: 14 | name: "Welsh LOA1 Corp" 15 | about: "

Welsh LOA1 Corp is the premier identity proofing service around. Come get some.

" 16 | requirements: 17 | - a UK passport 18 | - a UK photocard driving licence 19 | -------------------------------------------------------------------------------- /stub/locales/idps/stub-idp-two.yml: -------------------------------------------------------------------------------- 1 | en: 2 | idps: 3 | stub-idp-two: 4 | name: "Bob’s Identity Service" 5 | about: "

Bob’s Identity Service is the premier identity proofing service around. Come get some.

" 6 | requirements: 7 | - a UK passport 8 | - a UK photocard driving licence 9 | contact_details: | 10 | 5 Somewhere Avenue 11 | cy: 12 | idps: 13 | stub-idp-two: 14 | name: "Welsh Bob’s Identity Service" 15 | about: "

Bob’s Identity Service is the premier identity proofing service around. Come get some.

" 16 | requirements: 17 | - a UK passport 18 | - a UK photocard driving licence 19 | contact_details: | 20 | 5 Somewhere Avenue 21 | -------------------------------------------------------------------------------- /stub/locales/idps/stub-idp-zero.yml: -------------------------------------------------------------------------------- 1 | en: 2 | idps: 3 | stub-idp-zero: 4 | name: "CitzenVerifier" 5 | contact_details: | 6 | about: CitzenVerifier is an IDP 7 | requirements: 8 | - a UK passport 9 | - a UK photocard driving licence 10 | 11 | cy: 12 | idps: 13 | stub-idp-zero: 14 | name: "Welsh CitzenVerifier" 15 | about: CitzenVerifier is an IDP 16 | requirements: 17 | - a UK passport 18 | - a UK photocard driving licence 19 | contact_details: | 20 |

21 | 0 Null Drive, Nowheresville 22 |
Telephone: 0123456789 23 |
Monday to Friday, 8am to 8pm 24 |
Saturday and Sunday, 8am to 5pm 25 |
Closed on bank holidays 26 |

27 | -------------------------------------------------------------------------------- /stub/locales/rps/test-rp-non-eidas.yml: -------------------------------------------------------------------------------- 1 | en: 2 | rps: 3 | test-rp-non-eidas: 4 | name: test GOV.UK Verify user journeys 5 | rp_name: Test RP 6 | analytics_description: analytics description for test-rp-non-eidas 7 | other_ways_text: | 8 |

If you can’t verify your identity using GOV.UK Verify, you can test GOV.UK Verify user journeys here.

9 |

Tell us your:

10 | 14 |

Include any other relevant details if you have them.

15 | other_ways_description: test GOV.UK Verify user journeys 16 | tailored_text:

This is tailored text for test-rp

17 | taxon_name: Benefits 18 | -------------------------------------------------------------------------------- /stub/relying_parties.yml: -------------------------------------------------------------------------------- 1 | ab_test_blacklist: 2 | - test-rp-no-ab-test 3 | 4 | transaction_type: 5 | display_name_and_homepage: 6 | - test-rp 7 | - test-rp-noc3 8 | - loa1-test-rp 9 | - loa2-loa1-test-rp 10 | -------------------------------------------------------------------------------- /stub/throttling.yml: -------------------------------------------------------------------------------- 1 | idps: 2 | alternatives: 3 | - name: 'stub-idp-one' 4 | percent: 50 5 | - name: 'stub-idp-two' 6 | percent: 50 7 | -------------------------------------------------------------------------------- /upstart/front.conf: -------------------------------------------------------------------------------- 1 | description "Upstart for front Service" 2 | start on (started network-interface 3 | or started network-manager 4 | or started networking) and filesystem 5 | 6 | stop on runlevel [!2345] 7 | 8 | console log 9 | 10 | setuid deployer 11 | 12 | pre-stop script 13 | front run rake zdd:set_unavailable 14 | end script 15 | 16 | script 17 | front run rake zdd:reset 18 | front run front >> /var/log/front/front-1.log 2>&1 19 | end script 20 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/vendor/assets/javascripts/.keep -------------------------------------------------------------------------------- /vendor/assets/javascripts/ga.js: -------------------------------------------------------------------------------- 1 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 2 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 3 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 4 | })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); -------------------------------------------------------------------------------- /vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alphagov/verify-frontend/088ae20bcfa821ba20d72226294e5540f3ed8eb7/vendor/assets/stylesheets/.keep --------------------------------------------------------------------------------