Authen::U2F::Tester::Role::Keystore(3pm)

Authen::U2F::Tester::Role::Keystore3pm

U2f tester keystore role.

Usage

 package Authen::U2F::Tester::Keystore::Example;
 use Moose;
 use namespace::autoclean;
 with 'Authen::U2F::Tester::Role::Keystore';
 sub exists {
     my ($self, $handle) = @_;
     ...
     # if handle is valid and exists in the keystore:
     return 1;
     # else
     return 0;
 }
 sub put {
     my ($self, $private_key) = @_;
     # somehow generate a unique handle
     return $handle;
 }
 sub get {
     my ($self, $handle) = @_;
     $handle = decode_base64url($handle);
     # fetch the Crypt::PK::ECC private key object associated with this handle.
     return $pkec;
 }
 __PACKAGE__->meta->make_immutable;

Version

version 0.03

Overview

This is a Moose::Role that Authen::U2F::Tester keystore's must consume. All required methods must be implemented by the consuming Moose class.

Methods

exists($handle): bool

Check if the given handle (in Base64 URL format) exists (or is valid) in the key store.

get($handle): Crypt::PK::ECC

Given the key handle (in Base64 URL format), return the private key (as a Crypt::PK::ECC object) associated with it in the key store.

put($private_key): scalar

Save the given keypair in the keystore, returning a unique key handle that uniquely identifies the keypair. The returned handle should NOT be Base64 URL encoded. $private_key is a raw private key string.

remove($handle): void

Remove the given key handle from the key store.

Source

The development version is on github at <http://https://github.com/mschout/perl-authen-u2f-tester> and may be cloned from <git://https://github.com/mschout/perl-authen-u2f-tester.git>

Releases

Unchanged in 4 releases since Debian 10 (Buster).

  1. 10–13

Bugs

Please report any bugs or feature requests on the bugtracker website <https://github.com/mschout/perl-authen-u2f-tester/issues>

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

Author

Michael Schout <[email protected]>

From libauthen-u2f-tester-perl 0.03-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.