public static function check($params, $method, $headers)
    {
        if (count(self::$implementations) !== 0 && !self::$userGetByEmailMethod) {
            throw new \Phramework\Exceptions\ServerException(
                'getUserByEmail method is not set'
            );
        }

        foreach (self::$implementations as $implementation) {
            if ($implementation->testProvidedMethod($params, $method, $headers)) {
                return $implementation->check($params, $method, $headers);
            }
        }

        return false; //Not found
    }
public static function check($params, $method, $headers)
    {
        if (count(self::$implementations) !== 0 && !self::$userGetByEmailMethod) {
            throw new \Phramework\Exceptions\ServerException(
                'getUserByEmail method is not set'
            );
        }

        foreach (self::$implementations as $implementation) {
            if ($implementation->testProvidedMethod($params, $method, $headers)) {
                return $implementation->check($params, $method, $headers);
            }
        }

        return false; //Not found
    }
public static function check ( $ params , $ method , $ headers ) { if ( count ( self :: $ implementations ) !== 0 && ! self :: $ userGetByEmailMethod ) { throw new \ Phramework \ Exceptions \ ServerException ( 'getUserByEmail method is not set' ) ; } foreach ( self :: $ implementations as $ implementation ) { if ( $ implementation -> testProvidedMethod ( $ params , $ method , $ headers ) ) { return $ implementation -> check ( $ params , $ method , $ headers ) ; } } return false ; //Not found }
Check user's authentication
This method iterates through all available authentication implementations
tests in priorioty order which of them might be provided and executes
@param  array  $params  Request parameters
@param  string $method  Request method
@param  array  $headers  Request headers
@return array|false Returns false on error or the user object on success
@throws Phramework\Exceptions\ServerException
Check user s authentication This method iterates through all available authentication implementations tests in priorioty order which of them might be provided and executes