Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit ecaf754

Browse files
author
Billy Clark
committed
some user accounts require MFA be set up before proceeding.
1 parent fcc48f9 commit ecaf754

File tree

3 files changed

+89
-2
lines changed

3 files changed

+89
-2
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ If configured, an alert will be shown to the user filled with the content of tha
138138
5. Click **hub-discovery**
139139
6. Click **idp4**
140140
7. Login as an "unprotected" user: `username=`**nag_for_mfa** `password=`**a**
141-
7. TODO: add remaining steps
142141

143142
#### Force MFA setup
144143
1. Goto [http://ssp-hub.local](http://ssp-hub.local)
@@ -148,7 +147,6 @@ If configured, an alert will be shown to the user filled with the content of tha
148147
5. Click **hub-discovery**
149148
6. Click **idp4**
150149
7. Login as an "unsafe" user: `username=`**must_set_up_mfa** `password=`**a**
151-
7. TODO: add remaining steps
152150

153151
#### Backup code
154152
1. Goto [http://ssp-hub.local](http://ssp-hub.local)

dictionaries/mfa.definition.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@
7878
"fr": "TODO",
7979
"ko": "TODO"
8080
},
81+
"required_header": {
82+
"en": "Protect this account",
83+
"es": "TODO",
84+
"fr": "TODO",
85+
"ko": "TODO"
86+
},
87+
"required_info": {
88+
"en": "Your account requires additional security, you must set up 2-step verification at this time.",
89+
"es": "TODO",
90+
"fr": "TODO",
91+
"ko": "TODO"
92+
},
8193
"button_verify": {
8294
"en": "Verify",
8395
"es": "TODO",
@@ -102,6 +114,12 @@
102114
"fr": "TODO",
103115
"ko": "TODO"
104116
},
117+
"button_set_up": {
118+
"en": "Set up now",
119+
"es": "TODO",
120+
"fr": "TODO",
121+
"ko": "TODO"
122+
},
105123
"remember_this": {
106124
"en": "Remember this computer for 30 days",
107125
"es": "TODO",
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title><?= $this->t('{material:mfa:title}') ?></title>
5+
6+
<?php include __DIR__ . '/../common-head-elements.php' ?>
7+
</head>
8+
<body class="gradient-bg">
9+
<div class="mdl-layout mdl-layout--fixed-header fill-viewport">
10+
<header class="mdl-layout__header">
11+
<div class="mdl-layout__header-row">
12+
<span class="mdl-layout-title">
13+
<?= $this->t('{material:mfa:header}') ?>
14+
</span>
15+
</div>
16+
</header>
17+
<main class="mdl-layout__content" layout-children="column">
18+
<form layout-children="column"> <!-- TODO: change method to POST once implemented -->
19+
<?php
20+
foreach ($this->data['formData'] as $name => $value) {
21+
?>
22+
<input type="hidden" name="<?= htmlentities($name); ?>"
23+
value="<?= htmlentities($value); ?>"/>
24+
<?php
25+
}
26+
?>
27+
<div class="mdl-card mdl-shadow--8dp">
28+
<div class="mdl-card__media white-bg margin" layout-children="column">
29+
<img src="/module.php/material/mfa-shield.svg"
30+
alt="<?= $this->t('{material:mfa:shield_icon}') ?>">
31+
</div>
32+
33+
<div class="mdl-card__title center">
34+
<h1 class="mdl-card__title-text">
35+
<?= $this->t('{material:mfa:required_header}') ?>
36+
</h1>
37+
</div>
38+
39+
<div class="mdl-card__title center" >
40+
<p class="mdl-card__subtitle-text">
41+
<?= $this->t('{material:mfa:required_info}') ?>
42+
</p>
43+
</div>
44+
45+
<div class="mdl-card__actions" layout-children="row">
46+
<span flex></span>
47+
48+
<?php
49+
$url = $this->data['learnMoreUrl'] ?? null;
50+
$url = "//example.org"; //TODO: remove when available
51+
if (! empty($url)) {
52+
?>
53+
<a href="<?= htmlentities($url) ?>" target="_blank"
54+
class="mdl-button mdl-button--primary margin">
55+
<?= $this->t('{material:mfa:button_learn_more}') ?>
56+
</a>
57+
<?php
58+
}
59+
?>
60+
61+
<button type="submit" name="setUpMfa"
62+
class="mdl-button mdl-button--raised mdl-button--primary">
63+
<?= $this->t('{material:mfa:button_set_up}') ?>
64+
</button>
65+
</div>
66+
</div>
67+
</form>
68+
</main>
69+
</div>
70+
</body>
71+
</html>

0 commit comments

Comments
 (0)