App-BCVI

 view release on metacpan or  search on metacpan

bin/bcvi  view on Meta::CPAN

Use C<cmnd> as the command to send over the back-channel (default: vi).
Recognised commands are described in L<COMMANDS> below.
END_POD
    );

    $class->register_option(
        name        => 'reuse-auth',
        summary     => "don't generate a new auth key on listener startup",
        description => <<'END_POD'
A new (random) authorisation key is generated when the listener process is
started - this will invalidate the keys in use by existing SSH sessions.
This option is for use when it is necessary to restart the listener process
without invalidating client keys.
END_POD
    );

    $class->register_option(
        name        => 'plugin-help',
        arg_spec    => '=s',
        arg_name    => '<plugin>',
        dispatch_to => 'plugin_help',

bin/bcvi  view on Meta::CPAN

    }
}


sub dispatch_request {
    my($self) = @_;

    $self->send_response(100);
    my $req = $self->collect_headers();
    $self->DEBUG("Calling host: " . $self->calling_host) if $self->calling_host;
    $self->validate_auth_key($req->{auth_key})
        or $self->exit_response(900);
    $self->DEBUG("Received command: $req->{command}");
    my $method = $self->command_handler($req->{command})
        or $self->exit_response(910);
    $self->DEBUG("Dispatching to: $method");
    $self->$method();
    $self->send_response(200);
}


sub validate_auth_key {
    my($self, $key) = @_;

    return 1 if $key && $key eq $self->auth_key;
    my $alias = $self->calling_host();
    $self->DEBUG("Invalid Auth-Key in request from $alias") if $key;
    return;
}


sub send_response {



( run in 0.486 second using v1.01-cache-2.11-cpan-a5abf4f5562 )