src/Phalcon/Auth/Auth.php
public function check(TokenGetter $parser, string $key)  : bool
	{
		$token = $parser->parse();

		if(!$token) {
			$this->appendMessage('missing token');
			return false;
		}

		$payload = $this->decode($token, $key);
		if(!$payload || empty($payload)) {
			return false;
		}

		$this->payload = $payload;

		// if any of the callback return false, this will immediately return false
		foreach($this->_onCheckCb as $callback) {
			if( $callback($this) === false ) {
				return false;
			}
		}

		return true;
	}
public function check(TokenGetter $parser, string $key)  : bool
	{
		$token = $parser->parse();

		if(!$token) {
			$this->appendMessage('missing token');
			return false;
		}

		$payload = $this->decode($token, $key);
		if(!$payload || empty($payload)) {
			return false;
		}

		$this->payload = $payload;

		// if any of the callback return false, this will immediately return false
		foreach($this->_onCheckCb as $callback) {
			if( $callback($this) === false ) {
				return false;
			}
		}

		return true;
	}
public function check ( TokenGetter $ parser , string $ key ) : bool { $ token = $ parser -> parse ( ) ; if ( ! $ token ) { $ this -> appendMessage ( 'missing token' ) ; return false ; } $ payload = $ this -> decode ( $ token , $ key ) ; if ( ! $ payload || empty ( $ payload ) ) { return false ; } $ this -> payload = $ payload ; // if any of the callback return false, this will immediately return false foreach ( $ this -> _onCheckCb as $ callback ) { if ( $ callback ( $ this ) === false ) { return false ; } } return true ; }
Checks and validates JWT.
Calls the oncheck callbacks and pass self as parameter.

@param Dmkit\Phalcon\Auth\TokenGetter\AdapterInterface $parser
@param string $key

@return bool
Checks and validates JWT . Calls the oncheck callbacks and pass self as parameter .