diff --git a/lam/help/help.inc b/lam/help/help.inc index 2f626d78..455cd87c 100644 --- a/lam/help/help.inc +++ b/lam/help/help.inc @@ -285,6 +285,8 @@ $helpArray = array ( "Text" => _('URL of external 2-factor authentication service.')), "516" => array ("Headline" => _('Disable certificate check'), "Text" => _('This will disable the check of the SSL certificates for the 2-factor authentication service. Not recommended for production usage.')), + "517" => array ("Headline" => _('Label'), + "Text" => _('Use this to overwrite the default label for the 2-factor input field. Default is "PIN+Token".')), "520" => array ("Headline" => _("Generate random password"), "Text" => _("This will set a random password and display it on the screen or send it to the user via mail. Please edit your LAM server profile to setup the mail settings.")), "550" => array ("Headline" => _("From address"), diff --git a/lam/lib/2factor.inc b/lam/lib/2factor.inc new file mode 100644 index 00000000..7ee11872 --- /dev/null +++ b/lam/lib/2factor.inc @@ -0,0 +1,80 @@ +authenticate($selfServiceProfile, $user, $password); + } + + /** + * Authenticates against the server + * + * @param unknown $selfServiceProfile + * @param unknown $user + * @param unknown $password + * @return string token + * @throws \Exception error during authentication + */ + private function authenticate($selfServiceProfile, $user, $password) { + $curl = $this->getCurl($selfServiceProfile); + } + + /** + * Returns the curl object. + * + * @param unknown $selfServiceProfile + * @return object curl handle + * @throws \Exception error during curl creation + */ + private function getCurl($selfServiceProfile) { + $curl = curl_init(); + return $curl; + } + +} diff --git a/lam/lib/selfService.inc b/lam/lib/selfService.inc index 18f8af8e..a819f0b2 100644 --- a/lam/lib/selfService.inc +++ b/lam/lib/selfService.inc @@ -384,6 +384,7 @@ class selfServiceProfile { public $twoFactorAuthentication = selfServiceProfile::TWO_FACTOR_NONE; public $twoFactorAuthenticationURL = 'https://localhost'; public $twoFactorAuthenticationInsecure = false; + public $twoFactorAuthenticationLabel = null; /** * Constructor @@ -425,6 +426,7 @@ class selfServiceProfile { $this->twoFactorAuthentication = selfServiceProfile::TWO_FACTOR_NONE; $this->twoFactorAuthenticationURL = 'https://localhost'; $this->twoFactorAuthenticationInsecure = false; + $this->twoFactorAuthenticationLabel = null; } }