public function checkToken($request_token)
    {
        $token_manager = $this->container->get('security.csrf.token_manager');
        $token = new CsrfToken('file_manager', $request_token);
        $valid = $token_manager->isTokenValid($token);

        if (!$valid) {
            throw new InvalidCsrfTokenException();
        }
    }
public function checkToken($request_token)
    {
        $token_manager = $this->container->get('security.csrf.token_manager');
        $token = new CsrfToken('file_manager', $request_token);
        $valid = $token_manager->isTokenValid($token);

        if (!$valid) {
            throw new InvalidCsrfTokenException();
        }
    }
public function checkToken ( $ request_token ) { $ token_manager = $ this -> container -> get ( 'security.csrf.token_manager' ) ; $ token = new CsrfToken ( 'file_manager' , $ request_token ) ; $ valid = $ token_manager -> isTokenValid ( $ token ) ; if ( ! $ valid ) { throw new InvalidCsrfTokenException ( ) ; } }
Check if the form token is valid

@param string $request_token
@throws InvalidCsrfTokenException when the token is not valid
Check if the form token is valid