Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
Separate renderer for each provider
Browse files Browse the repository at this point in the history
  • Loading branch information
umpirsky committed Aug 17, 2016
1 parent eeba4a3 commit 23f17a2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 0 additions & 4 deletions Resources/config/security.xml
Expand Up @@ -54,9 +54,5 @@
<service id="scheb_two_factor.authentication_context_factory" class="%scheb_two_factor.authentication_context_factory.class%">
<argument>%scheb_two_factor.authentication_context.class%</argument>
</service>
<service id="scheb_two_factor.security.renderer" class="%scheb_two_factor.security.renderer.class%" lazy="true">
<argument type="service" id="templating" />
<argument>%scheb_two_factor.google.template%</argument>
</service>
</services>
</container>
6 changes: 5 additions & 1 deletion Resources/config/security_email.xml
Expand Up @@ -28,8 +28,12 @@
<tag name="scheb_two_factor.provider" alias="email" />
<argument type="service" id="scheb_two_factor.security.email.code_generator" />
<argument type="service" id="scheb_two_factor.security.email.code_validator" />
<argument type="service" id="scheb_two_factor.security.renderer" />
<argument type="service" id="scheb_two_factor.security.email.renderer" />
<argument>%scheb_two_factor.parameter_names.auth_code%</argument>
</service>
<service id="scheb_two_factor.security.email.renderer" class="%scheb_two_factor.security.renderer.class%" lazy="true">
<argument type="service" id="templating" />
<argument>%scheb_two_factor.email.template%</argument>
</service>
</services>
</container>
6 changes: 5 additions & 1 deletion Resources/config/security_google.xml
Expand Up @@ -25,8 +25,12 @@
<service id="scheb_two_factor.security.google.provider" class="%scheb_two_factor.security.google.provider.class%">
<tag name="scheb_two_factor.provider" alias="google" />
<argument type="service" id="scheb_two_factor.security.google.code_validator" />
<argument type="service" id="scheb_two_factor.security.renderer" />
<argument type="service" id="scheb_two_factor.security.google.renderer" />
<argument>%scheb_two_factor.parameter_names.auth_code%</argument>
</service>
<service id="scheb_two_factor.security.google.renderer" class="%scheb_two_factor.security.renderer.class%" lazy="true">
<argument type="service" id="templating" />
<argument>%scheb_two_factor.google.template%</argument>
</service>
</services>
</container>

0 comments on commit 23f17a2

Please sign in to comment.