warnings;
use Mouse;
use MIME::Base64 qw(encode_base64url decode_base64url);
use JSON qw(decode_json from_json to_json);
use Digest::SHA qw(sha256);
use Crypt::PK::ECC;
use Crypt::PK::RSA;
use Crypt:
%params ) = @_;
my (
$challenge_b64, $requested_uv,
$client_data_json_b64, $attestation_object_b64,
$token_binding_id_b64, $trust_anchors,
$a
t,
)
= @params{ qw(
challenge_b64 requested_uv
client_data_json_b64 attestation_object_b64
token_binding_id_b64 trust_anchors
allowed_attesta
e Digest::SHA qw(sha256);
use Crypt::PK::ECC;
use Hash::Merge::Simple qw/merge/;
use JSON qw(encode_json decode_json);
use Authen::WebAuthn;
use utf8;
has origin => ( is => 'rw' );
has rp_id => ( is
clientDataJSON
if ( $credential->{response}->{clientDataJSON} ) {
$credential->{response}->{clientDataJSON} =
encode_base64url( $credential->{response}->{clientDataJSON} );
}
d} ) {
$credential->{rawId} = encode_base64url( $credential->{rawId} );
}
return JSON->new->utf8->pretty->encode($credential);
}
sub encode_cosekey {
my ($self) = @_;
my $k
allenge_b64 => ... ,
requested_uv => ... ,
client_data_json_b64 => ... ,
attestation_object_b64 => ... ,
token_binding_id_b64 =>
stored_sign_count => ...,
requested_uv => ...,
client_data_json_b64 => ...,
authenticator_data_b64 => ...,
signature_b64 => ..
this operation.
Possible values are C<required>, C<preferred>, C<discouraged>.
=item client_data_json_b64
The base64url-encoded client data received from the authenticator
=item attestation_object_