Add authentication configuration and allowed methods logic
This commit is contained in:
parent
cabf1f35a8
commit
70c0fb2e54
4 changed files with 349 additions and 65 deletions
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace Socialbox\Classes\Configuration;
|
||||
|
||||
class AuthenticationConfiguration
|
||||
{
|
||||
private bool $enabled;
|
||||
private bool $imageCaptchaVerificationRequired;
|
||||
|
||||
/**
|
||||
* Public Constructor for the AuthenticationConfiguration class
|
||||
*
|
||||
* @param array $data The array data configuration
|
||||
*/
|
||||
public function __construct(array $data)
|
||||
{
|
||||
$this->enabled = (bool)$data['enabled'];
|
||||
$this->imageCaptchaVerificationRequired = (bool)$data['image_captcha_verification_required'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isImageCaptchaVerificationRequired(): bool
|
||||
{
|
||||
return $this->imageCaptchaVerificationRequired;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue