public static function check($name, $credentials = null, array $options = []) {
		$config = static::config($name);
		$defaults = [
			'checkSession' => true,
			'writeSession' => true,
			'persist' => $config['session']['persist'] ?: static::_config('persist')
		];

		$options += $defaults;
		$params = compact('name', 'credentials', 'options');

		return Filters::run(get_called_class(), __FUNCTION__, $params, function($params) {
			extract($params);
			$config = static::_config($name);

			if ($config === null) {
				throw new ConfigException("Configuration `{$name}` has not been defined.");
			}
			$session = $config['session'];

			if ($options['checkSession']) {
				if ($data = $session['class']::read($session['key'], $session['options'])) {
					return $data;
				}
			}

			if (($credentials) && $data = static::adapter($name)->check($credentials, $options)) {
				if ($options['persist'] && is_array($data)) {
					$data = array_intersect_key($data, array_fill_keys($options['persist'], true));
				} elseif (is_array($data)) {
					unset($data['password']);
				}
				return ($options['writeSession']) ? static::set($name, $data) : $data;
			}
			return false;
		});
	}