Authen...eystore(3pm)

πŸ’– Authen::U2F::Tester::Role::Keystore β€” the tea β˜•

okay bestie, so this is a Perl manual page (3pm, aka a module page, the "User Contributed Perl Documentation" kind) for Authen::U2F::Tester::Role::Keystore, which is a Moose::Role β€” that's the U2F Tester Keystore Role, no cap. Sit down, grab a strawberry drink πŸ“, we're doing this.


✨ NAME ✨

Authen::U2F::Tester::Role::Keystore β€” it's literally the U2F Tester Keystore Role. That's the whole name. Iconic, brief, we love her πŸ’…

🌸 VERSION 🌸

version 0.03 β€” yes queen, we're on 0.03.

πŸ¦‹ SYNOPSIS πŸ¦‹

so here's the vibe: you make your own package, you use Moose, you clean up your namespace, and you consume the role. Like this, exactly like this:

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;

and then you make_immutable at the end because that's just what we do 🫢

πŸ‘‘ DESCRIPTION πŸ‘‘

This is a Moose::Role that Authen::U2F::Tester keystore's must consume. all the required methods have to be implemented by the consuming Moose class β€” no skipping, no half-effort, the role is not gonna do it for you bestie 😭

πŸ’… METHODS πŸ’…

exists($handle): bool

Check if the given handle (in Base64 URL format) exists (or is valid) in the key store. returns a bool, so like, 1 or 0, that's it.

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. that's the whole job. hand over the key πŸ”‘

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. not encoded. raw. don't do it πŸ™ˆ

remove($handle): void

Remove the given key handle from the key store. bye bye πŸ‘‹ returns nothing, void, it's giving closure.


🌈 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>

(those URLs are verbatim, i'm not touching them, not my business πŸ’€)

πŸ’€ 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.

like fr fr, include a test file or a patch. a reproduction. don't just show up in the issues saying "it's broken" with zero receipts 😭 that's not the move.

πŸŽ€ AUTHOR πŸŽ€

Michael Schout <mschout@cpan.org>

This software is copyright (c) 2017 by Michael Schout.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


and that's the page bestie! this was perl v5.26.2, dated 2018-04-12, and it's the Authen...eystore(3pm) page β€” so if you see that footer floating around somewhere, now you know where it came from πŸ§šπŸ’œ mwah, go write your keystore. periodt. πŸ’–

πŸ“¦ where this page comes from