diff options
Diffstat (limited to 'src/Wallabag/UserBundle/Resources')
3 files changed, 84 insertions, 0 deletions
diff --git a/src/Wallabag/UserBundle/Resources/config/services.yml b/src/Wallabag/UserBundle/Resources/config/services.yml index e69de29b..9cdd247d 100644 --- a/src/Wallabag/UserBundle/Resources/config/services.yml +++ b/src/Wallabag/UserBundle/Resources/config/services.yml | |||
@@ -0,0 +1,19 @@ | |||
1 | parameters: | ||
2 | wallabag_user.twofactor.email.provider.class: Wallabag\UserBundle\Security\TwoFactor\Email\Helper | ||
3 | wallabag_user.twofactor.email.interactive_login_listener.class: Wallabag\UserBundle\Security\TwoFactor\Email\InteractiveLoginListener | ||
4 | wallabag_user.twofactor.email.request_listener.class: Wallabag\UserBundle\Security\TwoFactor\Email\RequestListener | ||
5 | |||
6 | services: | ||
7 | wallabag_user.twofactor.email.provider: | ||
8 | class: %wallabag_user.twofactor.email.provider.class% | ||
9 | arguments: ['@doctrine.orm.entity_manager', '@mailer'] | ||
10 | wallabag_user.twofactor.email.interactive_login_listener: | ||
11 | class: %wallabag_user.twofactor.email.interactive_login_listener.class% | ||
12 | tags: | ||
13 | - { name: kernel.event_listener, event: security.interactive_login, method: onSecurityInteractiveLogin } | ||
14 | arguments: ['@wallabag_user.twofactor.email.provider'] | ||
15 | wallabag_user.twofactor.email.request_listener: | ||
16 | class: %wallabag_user.twofactor.email.request_listener.class% | ||
17 | tags: | ||
18 | - { name: kernel.event_listener, event: kernel.request, method: onCoreRequest, priority: -1 } | ||
19 | arguments: ['@wallabag_user.twofactor.email.provider', '@security.context', '@templating', '@router'] | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Authentication/form.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Authentication/form.html.twig new file mode 100644 index 00000000..5bb91081 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Authentication/form.html.twig | |||
@@ -0,0 +1,32 @@ | |||
1 | {% extends "WallabagUserBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block fos_user_content %} | ||
4 | <form class="form" action="" method="post"> | ||
5 | <fieldset class="w500p center"> | ||
6 | {% for flashMessage in app.session.flashbag.get("two_factor") %} | ||
7 | <p class="error">{{ flashMessage|trans }}</p> | ||
8 | {% endfor %} | ||
9 | |||
10 | <div class="row"> | ||
11 | <label for="_auth_code">{{ "scheb_two_factor.auth_code"|trans }}</label> | ||
12 | <input id="_auth_code" type="text" autocomplete="off" name="_auth_code" /> | ||
13 | </div> | ||
14 | |||
15 | {% if useTrustedOption %} | ||
16 | <div class="row"> | ||
17 | <input id="_trusted" type="checkbox" name="_trusted" /> | ||
18 | <label for="_trusted">{{ "scheb_two_factor.trusted"|trans }}</label> | ||
19 | </div> | ||
20 | {% endif %} | ||
21 | |||
22 | <div class="row mts txtcenter"> | ||
23 | <a href="{{ path('fos_user_security_logout') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Cancel{% endtrans %}</a> | ||
24 | <button type="submit" name="send"> | ||
25 | {{ "scheb_two_factor.login"|trans }} | ||
26 | <i class="mdi-content-send right"></i> | ||
27 | </button> | ||
28 | </div> | ||
29 | </fieldset> | ||
30 | |||
31 | </form> | ||
32 | {% endblock %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Authentication/form.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Authentication/form.html.twig new file mode 100644 index 00000000..fa0e3dc1 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Authentication/form.html.twig | |||
@@ -0,0 +1,33 @@ | |||
1 | {% extends "WallabagUserBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block fos_user_content %} | ||
4 | <form class="form" action="" method="post"> | ||
5 | <div class="card-content"> | ||
6 | <div class="row"> | ||
7 | |||
8 | {% for flashMessage in app.session.flashbag.get("two_factor") %} | ||
9 | <p class="error">{{ flashMessage|trans }}</p> | ||
10 | {% endfor %} | ||
11 | |||
12 | <div class="input-field col s12"> | ||
13 | <label for="_auth_code">{{ "scheb_two_factor.auth_code"|trans }}</label> | ||
14 | <input id="_auth_code" type="text" autocomplete="off" name="_auth_code" /> | ||
15 | </div> | ||
16 | |||
17 | {% if useTrustedOption %} | ||
18 | <div class="input-field col s12"> | ||
19 | <input id="_trusted" type="checkbox" name="_trusted" /> | ||
20 | <label for="_trusted">{{ "scheb_two_factor.trusted"|trans }}</label> | ||
21 | </div> | ||
22 | {% endif %} | ||
23 | </div> | ||
24 | </div> | ||
25 | <div class="card-action center"> | ||
26 | <a href="{{ path('fos_user_security_logout') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Cancel{% endtrans %}</a> | ||
27 | <button class="btn waves-effect waves-light" type="submit" name="send"> | ||
28 | {{ "scheb_two_factor.login"|trans }} | ||
29 | <i class="mdi-content-send right"></i> | ||
30 | </button> | ||
31 | </div> | ||
32 | </form> | ||
33 | {% endblock %} | ||