[pve-devel] [PATCH common] add u2f challenge accessors to RESTEnvironment

Thomas Lamprecht t.lamprecht at proxmox.com
Fri May 25 07:58:23 CEST 2018


On 5/24/18 3:28 PM, Wolfgang Bumiller wrote:
> Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
> ---
>  src/PVE/RESTEnvironment.pm | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/src/PVE/RESTEnvironment.pm b/src/PVE/RESTEnvironment.pm
> index 32ffdd1..9c966dd 100644
> --- a/src/PVE/RESTEnvironment.pm
> +++ b/src/PVE/RESTEnvironment.pm
> @@ -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 "user active challenge\n";

does a "no" miss here at the error messages start?
Else I'm confused ^^

> +}
> +
>  sub is_worker {
>      my ($class) = @_;
>  
> 





More information about the pve-devel mailing list