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

Commit

Permalink
Implementation of error handling refs #55
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddyKaiser committed Nov 10, 2015
1 parent 8aeac15 commit d5fee6c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Auth/Source/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,15 @@ protected function login($username, $language, $message) {
/* Allowed MCC in the config ? */
if (count($this->allowed_mcc) > 0) {
if (!in_array($this->mcc, $this->allowed_mcc)) {
$erroris = 'MCC';

/* Log the details */
SimpleSAML_Logger::warning('MobileID: not in alloed MCC !');
SimpleSAML_Logger::warning('MobileID: ' . var_export($this->mcc, TRUE) . ' not in the allowed_mcc list');

/* Define the error as array to pass specific parameters beside the proper error code */
$error = array(
$erroris,
'UserAssistanceURL' => "<a href='http://valais.ch' target='_blank'>Wallis</a>",
'UserAssistanceURL' => "<a href='https://en.wikipedia.org/wiki/Mobile_country_code#W' target='_blank'>Wallis</a>",
'mcc' => $this->mcc,
'mnc' => $this->mnc
);
Expand Down

0 comments on commit d5fee6c

Please sign in to comment.