NAME
FIDO::Raw::Assert
VERSION
version 0.02
DESCRIPTION
FIDO2 Assertion
METHODS
new( )
Create a new instance.
allow_cred( $cred )
Append the credential $cred
to the list of credentials allowed for this assertion.
authdata( [$index = 0, $data] )
Get/set the authenticator data. $data
must be a CBOR-encoded byte string. Alternatively, authdata_raw
may be used to set raw binary blob.
authdata_raw( $data, [$index = 0] )
Set the authenticator data as a raw binary blob.
clientdata_hash( [$hash] )
Get/set the clientdata hash.
count( [$total] )
Get/set the number of assertion statements.
extensions( $flags )
Set the extensions to the bitmask of $flags
. At the moment, only EXT_HMAC_SECRET
is supported.
hmac_salt( $salt )
Set the HMAC salt.
hmac_secret( [$index = 0] )
Get the HMAC secret.
rp( [$id] )
Get/set the relying party ID.
sig( [$index = 0, $signature] )
Get/set the signature.
sigcount( [$index = 0] )
Get the signature counter.
up( )
Set the user presence attribute.
user( [$index = 0] )
Get the user details. Returns a hash reference.
uv( )
Set the user verification attribute.
flags( [$index = 0] )
Get the authenticator data flags.
id( [$index = 0] )
Get the credential ID.
verify( $index, $alg, $pk )
Verifies whether the signature contained in statement $index
matches the parameters of the assertion. It verifies whether the client data hash, relying party ID, user presence and user verification attributes of the assertion have been attested by the holder of the private counterpart of the public key $pk
using the COSE type $alg
. $alg
is constrained to COSE_ES256
, COSE_RS256
and COSE_EDDSA
. $pk
should be a FIDO::Raw::PublicKey::ES256
, FIDO::Raw::PublicKey::RS256
, or a FIDO::Raw::PublicKey::EDDSA
.
This method returns a result code of FIDO::Raw::FIDO_OK
on success or an error result code otherwise.
AUTHOR
Jacques Germishuys <jacquesg@striata.com>
LICENSE AND COPYRIGHT
Copyright 2020 Jacques Germishuys.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.