5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-08 01:17:37 +03:00

add u2f challenge accessors to RESTEnvironment

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-04-02 12:22:00 +02:00 committed by Thomas Lamprecht
parent 34e75688f6
commit 61aca93afb

View File

@ -217,6 +217,20 @@ sub get_user {
die "user name not set\n";
}
sub set_u2f_challenge {
my ($self, $challenge) = @_;
$self->{u2f_challenge} = $challenge;
}
sub get_u2f_challenge {
my ($self, $noerr) = @_;
return $self->{u2f_challenge} if defined($self->{u2f_challenge}) || $noerr;
die "no active u2f challenge\n";
}
sub is_worker {
my ($class) = @_;