<commit_before><?php

/**
 * @copyright  <NAME>
 * @license    http://www.makoframework.com/license
 */

namespace mako\auth;

use \LogicException;

use \mako\auth\providers\GroupProviderInterface;
use \mako\auth\providers\UserProviderInterface;
use \mako\http\Request;
use \mako\http\Response;
use \mako\session\Session;

/**
 * Gatekeeper authentication.
 *
 * @author  <NAME>
 */

class Gatekeeper
{
	/**
	 * Have we checked for a valid login?
	 * 
	 * @var boolean
	 */

	protected $isChecked = false;

	/**
	 * Status code for banned users.
	 * 
	 * @var int
	 */

	const LOGIN_BANNED = 100;

	/**
	 * Status code for users who need to activate their account.
	 * 
	 * @var int
	 */

	const LOGIN_ACTIVATING = 101;

	/**
	 * Status code for users who fail to provide the correct credentials.
	 * 
	 * @var int
	 */

	const LOGIN_INCORRECT = 102;

	/**
	 * Request instance.
	 * 
	 * @var \mako\http\Request
	 */

	protected $request;

	/**
	 * Response instance.
	 * 
	 * @var \mako\http\Response
	 */

	protected $response;

	/**
	 * Session instance.
	 * 
	 * @var \mako\session\Session
	 */

	protected $session;

	/**
	 * User provider.
	 * 
	 * @var \mako\auth\UserProviderInterface
	 */

	protected $userProvider;

	/**
	 * Group provider.
	 * 
	 * @var \mako\auth\GroupProviderInterface
	 */

	protected $groupProvider;

	/**
	 * Auth key.
	 * 
	 * @var string
	 */

	protected $authKey = 'gatekeeper_auth_key';

	/**
	 * Cookie options.
	 * 
	 * @var array
	 */

	protected $cookieOptions = 
	[
		'path'     => '/',
		'domain'   => '',
		'secure'   => false,
		'httponly' => false,
	];

	/**
	 * User instance.
	 * 
	 * @var \mako\auth\models\User
	 */

	protected $user;

	/**<commit_msg>Updated docblock<commit_after><?php

/**
 * @copyright  <NAME>
 * @license    http://www.makoframework.com/license
 */

namespace mako\auth;

use \LogicException;

use \mako\auth\providers\GroupProviderInterface;
use \mako\auth\providers\UserProviderInterface;
use \mako\http\Request;
use \mako\http\Response;
use \mako\session\Session;

/**
 * Gatekeeper authentication.
 *
 * @author  <NAME>
 */

class Gatekeeper
{
	/**
	 * Have we checked for a valid login?
	 * 
	 * @var boolean
	 */

	protected $isChecked = false;

	/**
	 * Status code for banned users.
	 * 
	 * @var int
	 */

	const LOGIN_BANNED = 100;

	/**
	 * Status code for users who need to activate their account.
	 * 
	 * @var int
	 */

	const LOGIN_ACTIVATING = 101;

	/**
	 * Status code for users who fail to provide the correct credentials.
	 * 
	 * @var int
	 */

	const LOGIN_INCORRECT = 102;

	/**
	 * Request instance.
	 * 
	 * @var \mako\http\Request
	 */

	protected $request;

	/**
	 * Response instance.
	 * 
	 * @var \mako\http\Response
	 */

	protected $response;

	/**
	 * Session instance.
	 * 
	 * @var \mako\session\Session
	 */

	protected $session;

	/**
	 * User provider.
	 * 
	 * @var \mako\auth\UserProviderInterface
	 */

	protected $userProvider;

	/**
	 * Group provider.
	 * 
	 * @var \mako\auth\GroupProviderInterface
	 */

	protected $groupProvider;

	/**
	 * Auth key.
	 * 
	 * @var string
	 */

	protected $authKey = 'gatekeeper_auth_key';

	/**
	 * Cookie options.
	 * 
	 * @var array
	 */

	protected $cookieOptions = 
	[
		'path'     => '/',
		'domain'   => '',
		'secure'   => false,
		'httponly' => false,
	];

	/**
	 * User instance.
	 * 
	 * @var \mako\auth\user\User
	 */

	protected $user;

	/**
{'fraction_non_alphanumeric': 0.15212922173274596, 'fraction_numerical': 0.0052863436123348016, 'mean_word_length': 2.426559356136821, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1853963', 'n_tokens_mistral': 1335, 'n_tokens_neox': 1134, 'n_words': 267}