Skip to content

Commit

Permalink
Merge branch 'develop' into release-2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Rothuis committed Feb 21, 2017
2 parents fc36d03 + 41294cc commit 7839452
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 26 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Step-up Self-Service
====================

[![Build Status](https://travis-ci.org/SURFnet/Stepup-SelfService.svg)](https://travis-ci.org/SURFnet/Stepup-SelfService) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/SURFnet/Stepup-SelfService/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/SURFnet/Stepup-SelfService/?branch=develop) [![SensioLabs Insight](https://insight.sensiolabs.com/projects/d3edfdf9-2619-49d2-8f6f-cacc5492ce83/mini.png)](https://insight.sensiolabs.com/projects/d3edfdf9-2619-49d2-8f6f-cacc5492ce83)
[![Build Status](https://travis-ci.org/OpenConext/Stepup-SelfService.svg)](https://travis-ci.org/OpenConext/Stepup-SelfService) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/OpenConext/Stepup-SelfService/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/OpenConext/Stepup-SelfService/?branch=develop) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/d3edfdf9-2619-49d2-8f6f-cacc5492ce83/mini.png)](https://insight.sensiolabs.com/projects/d3edfdf9-2619-49d2-8f6f-cacc5492ce83)

This component is part of "Step-up Authentication as-a Service" and requires other supporting components to function. See [Stepup-Deploy](https://github.com/SURFnet/Stepup-Deploy) for an overview.
This component is part of "Step-up Authentication as-a Service" and requires other supporting components to function. See [Stepup-Deploy](https://github.com/OpenConext/Stepup-Deploy) for an overview.

## Requirements

* PHP 5.6+ or PHP7
* [Composer](https://getcomposer.org/)
* A web server (Apache, Nginx)
* Graylog2 (or disable this Monolog handler)
* A working [Gateway](https://github.com/SURFnet/Stepup-Gateway)
* Working [Middleware](https://github.com/SURFnet/Stepup-Middleware)
* A working [Gateway](https://github.com/OpenConext/Stepup-Gateway)
* Working [Middleware](https://github.com/OpenConext/Stepup-Middleware)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"fortawesome/font-awesome": "~4.2.0",
"jms/translation-bundle": "~1.1.0",
"jms/di-extra-bundle": "~1.4.0",
"surfnet/stepup-middleware-client-bundle": "^1.3",
"surfnet/stepup-middleware-client-bundle": "^1.5",
"guzzlehttp/guzzle": "~4",
"surfnet/stepup-saml-bundle": "^2.5",
"surfnet/stepup-bundle": "^1.5",
Expand Down
28 changes: 14 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,20 @@ class RegistrationController extends Controller
*/
public function displaySecondFactorTypesAction()
{
$enabledSecondFactors = $this->getParameter('ss.enabled_second_factors');
$institutionConfigurationOptions = $this->get('self_service.service.institution_configuration_options')
->getInstitutionConfigurationOptionsFor($this->getIdentity()->institution);

$availableSecondFactors = $this->getParameter('ss.enabled_second_factors');
if (!empty($institutionConfigurationOptions->allowedSecondFactors)) {
$availableSecondFactors = array_intersect(
$availableSecondFactors,
$institutionConfigurationOptions->allowedSecondFactors
);
}

return [
'commonName' => $this->getIdentity()->commonName,
'enabledSecondFactors' => array_combine($enabledSecondFactors, $enabledSecondFactors),
'availableSecondFactors' => array_combine($availableSecondFactors, $availableSecondFactors),
'tiqrAppAndroidUrl' => $this->getParameter('tiqr_app_android_url'),
'tiqrAppIosUrl' => $this->getParameter('tiqr_app_ios_url'),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<h2>{{ block('page_title') }}</h2>

<div class="row">
{% if enabledSecondFactors.sms is defined %}
{% if availableSecondFactors.sms is defined %}
{% include 'SurfnetStepupSelfServiceSelfServiceBundle::Registration/partial/secondFactor.html.twig' with {
'type': 'sms',
'security': 2,
Expand All @@ -21,7 +21,7 @@
'tiqrAppIosUrl': tiqrAppIosUrl,
} only %}
{% endif %}
{% if enabledSecondFactors.tiqr is defined %}
{% if availableSecondFactors.tiqr is defined %}
{% include 'SurfnetStepupSelfServiceSelfServiceBundle::Registration/partial/secondFactor.html.twig' with {
'type': 'tiqr',
'security': 2,
Expand All @@ -30,7 +30,7 @@
'tiqrAppIosUrl': tiqrAppIosUrl,
} only %}
{% endif %}
{% if enabledSecondFactors.yubikey is defined %}
{% if availableSecondFactors.yubikey is defined %}
{% include 'SurfnetStepupSelfServiceSelfServiceBundle::Registration/partial/secondFactor.html.twig' with {
'type': 'yubikey',
'security': 3,
Expand All @@ -39,7 +39,7 @@
'tiqrAppIosUrl': tiqrAppIosUrl,
} only %}
{% endif %}
{% if enabledSecondFactors.u2f is defined %}
{% if availableSecondFactors.u2f is defined %}
{% include 'SurfnetStepupSelfServiceSelfServiceBundle::Registration/partial/secondFactor.html.twig' with {
'type': 'u2f',
'security': 3,
Expand All @@ -48,7 +48,7 @@
'tiqrAppIosUrl': tiqrAppIosUrl,
} only %}
{% endif %}
{% if enabledSecondFactors.biometric is defined %}
{% if availableSecondFactors.biometric is defined %}
{% include 'SurfnetStepupSelfServiceSelfServiceBundle::Registration/partial/secondFactor.html.twig' with {
'type': 'biometric',
'security': 3,
Expand Down

0 comments on commit 7839452

Please sign in to comment.