Add authentication configuration and allowed methods logic

This commit is contained in:
netkas 2025-01-07 15:25:32 -05:00
parent cabf1f35a8
commit 70c0fb2e54
4 changed files with 349 additions and 65 deletions

View file

@ -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;
}
}