Register FIDO Device
Users can register a compatible device to act as a FIDO authenticator. To do so, some information about the device needs to be requested during a process known as attestation.
As defined in the FIDO2 Specifications,attestation is the capability of a FIDO-based authenticator (such as a security key or mobile device) to provide a cryptographic proof about its model to a remote relying party. Once this information is received, the device can be registered to an account.
Once a device is registered it can be used to authenticate users.
Registration Options
Some basic user account and tenant information is needed to register a device. This information can be found on the Developer Dashboard.
Parameters
username: Registered tenant username, typically your full email addressdns: Current domain as used in your browsercommunityName: tenant community name as shown in the dashboarddisplayName: Username to displayattestation: Attestation object - see belowauthenticatorSelection: Authenticator selection - see below
Request Format
- NodeJS
- PHP
- Java
- .NET
Step 1: FIDO Device Attestation (Registration) Options
The attestation and authenticatorSelection parameters differ depending on what type of FIDO device you are registering:
- If your device is a security key, such as a YubiKey:
const BIDWebAuthn = require('blockid-nodejs-helpers/BIDWebAuthn.js');
let attestationOptionsResponse = await BIDWebAuthn.fetchAttestationOptions({ "dns": "<dns>", "communityName": "<communityName>", "licenseKey": "<licenseKey>" }, {
"displayName":"<displayname>",
"username":"<username>",
"dns":"<current domain>",
"attestation":"direct"
"authenticatorSelection": {
"requiresResidentKey":true
},
});
- If your device is a platform authenticator, such as TouchID:
const BIDWebAuthn = require('blockid-nodejs-helpers/BIDWebAuthn.js');
let attestationOptionsResponse = await BIDWebAuthn.fetchAttestationOptions({ "dns": "<dns>", "communityName": "<communityName>", "licenseKey": "<licenseKey>" }, {
"displayName":"<displayname>",
"username":"<username>",
"dns":"<current domain>",
"attestation":"direct"
"authenticatorSelection": {
"authenticatorAttachment": "platform"
},
});
- If your device is a MacBook:
const BIDWebAuthn = require('blockid-nodejs-helpers/BIDWebAuthn.js');
let attestationOptionsResponse = await BIDWebAuthn.fetchAttestationOptions({ "dns": "<dns>", "communityName": "<communityName>", "licenseKey": "<licenseKey>" }, {
"displayName":"<displayname>",
"username":"<username>",
"dns":"<current domain>",
"attestation":"none"
},
});
Step 1: Set tenant info
<?php
$tenantInfo = array("dns" => "<dns>", "communityName" => "<communityName>", "licenseKey" => "<licenseKey>");
Step 2: Attestation and Authenticator Selection
The attestation and authenticatorSelection parameters differ depending on what type of FIDO device you are registering:
- If your device is a security key, such as a YubiKey
$optionsRequest = array(
"displayName" => "<displayname>",
"username" => "<username>",
"dns" => "<current domain>",
"attestation" => "direct",
"authenticatorSelection" => array(
"requireResidentKey" => true
)
);
- If your device is a platform authenticator, such as TouchID
$optionsRequest = array(
"displayName" => "<displayname>",
"username" => "<username>",
"dns" => "<current domain>",
"attestation" => "direct",
"authenticatorSelection" => array(
"authenticatorAttachment" => "platform"
)
);
- If your device is a MacBook
$optionsRequest = array(
"displayName" => "<displayname>",
"username" => "<username>",
"dns" => "<current domain>",
"attestation" => "none",
);
Step 3: Fetch FIDO registration (attestation) options
$attestationOptionsResponse = BIDWebAuthn::fetchAttestationOptions($tenantInfo, $optionsRequest);
?>
Step 1: Set tenant info
BIDTenantInfo tenantInfo = new BIDTenantInfo("<dns>", "<communityName>", "<license>");
Step 2: Fetch FIDO registration (attestation) options
BIDAttestationOptionsValue attestationOptionRequest = new BIDAttestationOptionsValue();
attestationOptionRequest.dns = "<dns>";
attestationOptionRequest.username = "<username>";
attestationOptionRequest.displayName = "<displayName>";
Step 3: Attestation and Authenticator Selection
The attestation and authenticatorSelection parameters differ depending on what type of FIDO device you are registering:
- If your device is a security key, such as a YubiKey:
BIDAuthenticatorSelectionValue authenticatorSelection = new BIDAuthenticatorSelectionValue();
authenticatorSelection.requireResidentKey = true;
attestationOptionRequest.attestation = "direct";
attestationOptionRequest.authenticatorSelection = authenticatorSelection;
- If your device is a platform authenticator, such as TouchID:
BIDAuthenticatorSelectionValue authenticatorSelection = new BIDAuthenticatorSelectionValue();
authenticatorSelection.authenticatorAttachment = "platform";
attestationOptionRequest.attestation = "direct";
attestationOptionRequest.authenticatorSelection = authenticatorSelection;
- If your device is a MacBook:
BIDAuthenticatorSelectionValue authenticatorSelection = new BIDAuthenticatorSelectionValue();
attestationOptionRequest.attestation = "none";
Step 4: Fetch Response
BIDAttestationOptionsResponse attestationOptionsResponse = BIDWebAuthn.fetchAttestationOptions(tenantInfo, attestationOptionRequest);
Step 1: Import libraries and set tenant info
using BIDHelpers.BIDWebAuthn;
using BIDHelpers.BIDWebAuthn.Model;
using BIDHelpers.BIDTenant.Model;
BIDTenantInfo bidTenantInfo = new BIDTenantInfo("<dns>", "<communityName>", "<license>");
Step 2: Attestation and Authenticator Selection
The attestation and authenticatorSelection parameters differ depending on what type of FIDO device you are registering:
- If your device is a security key, such as a YubiKey:
var bidAttestationValues = new BIDAttestationOptionsValue()
{
displayName = "<displayName>",
username = "<username>",
dns = "<dns>",
attestation = "direct",
authenticatorSelection = new BIDAuthenticatorSelectionValue()
{
requireResidentKey = true
},
};
- If your device is a platform authenticator, such as TouchID:
var bidAttestationValues = new BIDAttestationOptionsValue()
{
displayName = "<displayName>",
username = "<username>",
dns = "<dns>",
attestation = "direct",
authenticatorSelection = new BIDAuthenticatorSelectionValue()
{
authenticatorAttachment = "platform"
},
};
- If your device is a MacBook
var bidAttestationValues = new BIDAttestationOptionsValue()
{
displayName = "<displayName>",
username = "<username>",
dns = "<dns>",
attestation = "none",
};
Step 3: Fetch Response
BIDAttestationOptionsResponse attestationOptionsResponse = BIDWebAuthn.FetchAttestationOptions(bidTenantInfo, "<bidAttestationValues>");
Example Registration Options Request
We"ve provided an example request showing the registration options flow.
- NodeJS
- PHP
- Java
- .NET
const BIDWebAuthn = require('blockid-nodejs-helpers/BIDWebAuthn.js');
const BIDSDK = require('blockid-nodejs-helpers/BIDSDK.js');
const loaded = await BIDSDK.setupTenant(
{ dns: 'blockid-trial.1kosmos.net', communityName: 'devx' },
'24b4e0df-29ed-488d-bfe1-000000000000'
);
BIDWebAuthn.fetchAttestationOptions({
username: 'john.doe@company.com',
displayName: 'MyDevice',
attestation: 'direct',
authenticatorSelection: {
authenticatorAttachment: 'platform'
},
dns: 'blockid-trial.1kosmos.net'
})
<?php
require_once("./BIDTenant.php");
require_once("./BIDWebAuthn.php");
$tenantInfo = array("dns" => "blockid-trial.1kosmos.net", "communityName" => "devx", "licenseKey" => "24b4e0df-29ed-488d-bfe1-000000000000");
//authenticatorSelection
$optionsRequest = array(
"displayName" => "MyYubiKey",
"username" => "john.doe@company.com",
"dns" => "blockid-trial.1kosmos.net",
"attestation" => "direct",
"authenticatorSelection" => array(
"requireResidentKey" => true
)
);
$attestationOptionsResponse = BIDWebAuthn::fetchAttestationOptions($tenantInfo, $optionsRequest);
?>
BIDTenantInfo tenantInfo = new BIDTenantInfo("blockid-trial.1kosmos.net", "devx", "24b4e0df-29ed-488d-bfe1-000000000000");
BIDAttestationOptionsValue attestationOptionRequest = new BIDAttestationOptionsValue();
attestationOptionRequest.put("dns", "blockid-trial.1kosmos.net");
attestationOptionRequest.put("username", "john.doe@company.com");
attestationOptionRequest.put("displayName", "MyDevice");
BIDAuthenticatorSelectionValue authenticatorSelection = new BIDAuthenticatorSelectionValue();
authenticatorSelection.authenticatorAttachment = "platform";
attestationOptionRequest.attestation = "direct";
attestationOptionRequest.authenticatorSelection = authenticatorSelection;
BIDAttestationOptionsResponse attestationOptionsResponse = BIDWebAuthn.fetchAttestationOptions(tenantInfo, attestationOptionRequest);
using BIDHelpers.BIDWebAuthn;
using BIDHelpers.BIDWebAuthn.Model;
using BIDHelpers.BIDTenant.Model;
BIDTenantInfo bidTenantInfo = new BIDTenantInfo("blockid-trial.1kosmos.net", "devx", "24b4e0df-29ed-488d-bfe1-000000000000");
var bidAttestationValues = new BIDAttestationOptionsValue()
{
displayName = "MyDevice",
username = "john.doe@company.com",
dns = "blockid-trial.1kosmos.net",
attestation = "direct",
authenticatorSelection = new BIDAuthenticatorSelectionValue()
{
authenticatorAttachment = "platform"
},
};
BIDAttestationOptionsResponse attestationOptionsResponse = BIDWebAuthn.FetchAttestationOptions(bidTenantInfo, bidAttestationValues);
Example Registration Options Response
{
"rp": {
"name": "1kfido.blockid.co","id":"1kfido.blockid.co",
},
"user": {
"id": "u_G6bV8cwxY11ODyVcxR-ySp08a2EY6_9P8DQ8eojwg",
"name": "john.doe",
"displayName": "john.doe"
},
"attestation": "none",
"pubKeyCredParams": [{
"type": "public-key",
"alg": -7
}],
"timeout": 60000,
"authenticatorSelection": {
"userVerification": "preferred",
"requireResidentKey": false
},
"challenge":"ZXlKMGVYQWlPaUpLVjFRaUxDSmhiR2NpT2lKSVV6STFOaUo5LmV5SnlZVzVrSWpvaWIyeDZTV1ZMVDBacE1XVjJOazlKY1ZGaGEwNXdkVkZtU25abGVXUTRTa0pYTTJKRmJ6WTNVU0lzSW1GMVpDSTZJakZyWm1sa2J5NWliRzlqYTJsa0xtTnZJaXdpYzNWaUlqb2lhbTlvYm01a2IyVXlJaXdpWVhWMGFITmxiR1ZqZEdsdmJpSTZJaUlzSW1GMGRHVnpkR0YwYVc5dUlqb2libTl1WlNJc0ltbGtJam9pTlhKT1UweFNMVE5QYlVwMlpVNDVlV1JHTW00eldWRlFObGhGT1VSd1QwWlVUbE54UlZnNGJGSk9SU0lzSW1WNGNDSTZNVFkwTnpneU9EazJOMzAuNkNwMTVHRVVQcjMtd0JFdV84UlVXUXpEOGMxc0V3S1NnS19JcXBVYnhwQQ",
"excludeCredentials": [{
"type": "string",
"id": "string"
}, {...}
],
"status": "ok",
"errorMessage": ""
}
Registration Result
Once the device registration (attestation) options are returned, the device can be registered.
Parameters
rawId: Registration result raw IDattestationObject: Registration attestation objectgetAuthenticatorData: Authenticator datagetPublicKey: Device public keygetPublicKeyAlgorithm: Device public key algorithmgetTransports: Device transportsclientDataJSON: Client data in JSON formatauthenticatorAttachment: Device attachment typegetClientExtensionResults: Extension resultsid: Registration result IDtype: Public-keydns: Current domain
Request Format
- NodeJS
- PHP
- Java
- .NET
Step 1: Set tenant info
const BIDWebAuthn = require('blockid-nodejs-helpers/BIDWebAuthn.js');
const BIDSDK = require('blockid-nodejs-helpers/BIDSDK.js');
const loaded = await BIDSDK.setupTenant(
{ dns: '<current domain>', communityName: '<community name>' },
'<tenant license key>'
);
Step 2: Request Registration (attestation) Result
BIDWebAuthn.submitAttestationResult({
rawId: '<rawId>',
response: {
attestationObject: '<attestationObject>',
getAuthenticatorData: {},
getPublicKey: {},
getPublicKeyAlgorithm: {},
getTransports: {},
clientDataJSON: '<clientDataJSON>'
},
authenticatorAttachment: '<authenticatorAttachment>',
getClientExtensionResults: '<getClientExtensionResults>',
id: '<id>',
type: '<type>',
dns: '<current domain>'
})
Step 1: Set tenant info
<?php
require_once("./BIDTenant.php");
require_once("./BIDWebAuthn.php");
$tenantInfo = array("dns" => "<dns>", "communityName" => "<communityName>", "licenseKey" => "<licenseKey>");
Step 2: Request Registration (attestation) Result
$resultRequest = array(
"rawId" => "<rawId>",
"response" => array(
"attestationObject" => "<attestationObject>",
"getAuthenticatorData" => "<getAuthenticatorData>",
"getPublicKey" => "<getPublicKey>",
"getPublicKeyAlgorithm" => "<getPublicKeyAlgorithm>",
"getTransports" => "<getTransports>",
"clientDataJSON" => "<clientDataJSON>"
),
"authenticatorAttachment" => "<authenticatorAttachment>",
"getClientExtensionResults" => "<getClientExtensionResults>",
"id" => "<id>",
"type" => "<type>",
"dns" => "<current domain>"
);
$attestationResultResponse = BIDWebAuthn::submitAttestationResult($tenantInfo, $resultRequest);
?>
Step 1: Set tenant info
BIDTenantInfo tenantInfo = new BIDTenantInfo("<dns>", "<communityName>", "<tenant license key>");
Step 2: Request Registration (attestation) Result
BIDAttestationResultValue attestationResultRequest = new BIDAttestationResultValue();
attestationResultRequest.rawId = "<rawId>";
attestationResultRequest.response = "<response>";
attestationResultRequest.authenticatorAttachment = "<authenticatorAttachment>";
attestationResultRequest.getClientExtensionResults = "<getClientExtensionResults>";
attestationResultRequest.id = "<id>";
attestationResultRequest.type = "<type>";
attestationResultRequest.dns = "<dns>";
BIDAttestationResultData attestationResultResponse = BIDWebAuthn.submitAttestationResult(tenantInfo, attestationResultRequest);
Step 1: Import libraries and set tenant info
using BIDHelpers.BIDWebAuthn;
using BIDHelpers.BIDWebAuthn.Model;
using BIDHelpers.BIDTenant.Model;
BIDTenantInfo bidTenantInfo = new BIDTenantInfo("<dns>", "<communityName>", "<licenseKey>");
Step 2: Request Registration (attestation) Result
BIDAttestationResultValue attestationResultRequest = new BIDAttestationResultValue
{
rawId = "<rawId>",
response = new BIDAttestationResultResponseValue()
{
attestationObject = "<attestationObject>",
clientDataJSON = "<clientDataJSON>",
getAuthenticatorData = {},
getPublicKey = {},
getPublicKeyAlgorithm = {},
getTransports = {},
},
authenticatorAttachment = "<authenticatorAttachment>",
getClientExtensionResults = "<getClientExtensionResults>",
id = "<id>",
type = "<type>",
dns = "<current domain>"
};
BIDAttestationResultData attestationResultResponse = BIDWebAuthn.SubmitAttestationResult(bidTenantInfo, "<attestationResultRequest>");
Example Registration Result Request
We've provided an example registration result:
- NodeJS
- PHP
- Java
- .NET
const BIDSDK = require('blockid-nodejs-helpers/BIDSDK.js');
const loaded = await BIDSDK.setupTenant(
{ dns: 'blockid-trial.1kosmos.net', communityName: 'devx' },
'24b4e0df-29ed-488d-bfe1-000000000000'
);
const BIDWebAuthn = require('blockid-nodejs-helpers/BIDWebAuthn.js');
BIDWebAuthn.submitAttestationResult({
{
rawId: "C-4WjulifnXA7CXCsb-7Xg",
response: {
attestationObject: "o2NmbXRmcGFja2VkZ2F0dFN0bXSjY2FsZyZjc2lnWEYwRAIgOfSsUdb_JXdEfR5u4StcbGkxa546MBqbPw1A1H6F7CgCIDkka7ikVaNPdgq75f7plZUTYWwxHUQlNBmc9g5CAGOFY3g1Y4FZAsIwggK-MIIBpqADAgECAgRbFqi2MA0GCSqGSIb3DQEBCwUAMC4xLDAqBgNVBAMTI1l1YmljbyBVMkYgUm9vdCBDQSBTZXJpYWwgNDU3MjAwNjMxMCAXDTE0MDgwMTAwMDAwMFoYDzIwNTAwOTA0MDAwMDAwWjBvMQswCQYDVQQGEwJTRTESMBAGA1UECgwJWXViaWNvIEFCMSIwIAYDVQQLDBlBdXRoZW50aWNhdG9yIEF0dGVzdGF0aW9uMSgwJ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yTnBUMmxLU1ZWNlNURk9hVW81TG1WNVNubFpWelZyU1dwdmFVNHdiSFpPTTJoRlVrWlpNbFZYY0hCWmJEZzBVVEJhUjFOVVl6SmFTRTVSWkd4U2JFMXRNVVpUVkZKU1RqQmtNbFJxYURaUFEwbHpTVzFHTVZwRFNUWkpiWGgyV1RKR2MyRkhPWHBrUTBselNXNU9NVmxwU1RaSmJYQnNZbTFzZW1GRE1IaEphWGRwV1ZoV01HRklUbXhpUjFacVpFZHNkbUpwU1RaSmFVbHpTVzFHTUdSSFZucGtSMFl3WVZjNWRVbHFiMmxhUjJ4NVdsZE9NRWxwZDJsaFYxRnBUMmxKZEZONldUTldWVFZyWVRGU1JGRnRPV3RSVkZwTFRqTlZNV1ZzUmpObFJGWlpWVEJWZW1GdVVtaGlWR1JUV2xob1ZsUnRPWEJVU0dSV1NXbDNhVnBZYUhkSmFtOTRUbXBSTlU1cVl6Tk9hazE2WmxFdVUzY3RORVZPUVUxclgwWmxTalJUY1hkWFpWaEplakZEVGxGS2REWlBkbGxhZG5aV1NqRlJOMEl4VVEiLCJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjMwMDAiLCJjcm9zc09yaWdpbiI6ZmFsc2V9"
},
authenticatorAttachment: "cross-platform",
getClientExtensionResults: {},
id: "C-4WjulifnXA7CXCsb-7Xg",
type: "public-key",
dns: "blockid-trial.1kosmos.net"
}
<?php
require_once("./BIDTenant.php");
require_once("./BIDWebAuthn.php");
$tenantInfo = array("dns" => "blockid-trial.1kosmos.net", "communityName" => "devx", "licenseKey" => "24b4e0df-29ed-488d-bfe1-000000000000");
$resultRequest = array(
"rawId" => "C-4WjulifnXA7CXCsb-7Xg",
"response" => array(
"attestationObject" => "<o2NmbXRmcGFja2VkZ2F0dFN0bXSjY2FsZyZjc2lnWEYwRAIgOfSsUdb_JXdEfR5u4StcbGkxa546MBqbPw1A1H6F7CgCIDkka7ikVaNPdgq75f7plZUTYWwxHUQlNBmc9g5CAGOFY3g1Y4FZA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IW9qW0_9zKSyqHzA0mkw9MoboPiipO4PIgIznj32CJYION6_VfWiEtwvHrtuUEGT6JQnA94E69XoxZKz_RlnKcvoWtjcmVkUHJvdGVjdAI",
"getAuthenticatorData" => "",
"getPublicKey" => "",
"getPublicKeyAlgorithm" => "",
"getTransports" => "",
"clientDataJSON" => "eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiWlhsS01HVllRV2xQYVVwTFZqRlJhVXhEU21oaVIyTnBUMmxLU1ZWNlNURk9hVW81TG1WNVNubFpWelZyU1dwdmFVNHdiSFpPTTJoRlVrWlpNbFZYY0hCWmJEZzBVVEJhUjFOVVl6SmFTRTVSWkd4U2JFMXRNVVpUVkZKU1RqQmtNbFJxYURaUFEwbHpTVzFHTVZwRFNUWkpiWGgyV1RKR2MyRkhPWHBrUTBselNXNU9NVmxwU1RaSmJYQnNZbTFzZW1GRE1IaEphWGRwV1ZoV01HRklUbXhpUjFacVpFZHNkbUpwU1RaSmFVbHpTVzFHTUdSSFZucGtSMFl3WVZjNWRVbHFiMmxhUjJ4NVdsZE9NRWxwZDJsaFYxRnBUMmxKZEZONldUTldWVFZyWVRGU1JGRnRPV3RSVkZwTFRqTlZNV1ZzUmpObFJGWlpWVEJWZW1GdVVtaGlWR1JUV2xob1ZsUnRPWEJVU0dSV1NXbDNhVnBZYUhkSmFtOTRUbXBSTlU1cVl6Tk9hazE2WmxFdVUzY3RORVZPUVUxclgwWmxTalJUY1hkWFpWaEplakZEVGxGS2REWlBkbGxhZG5aV1NqRlJOMEl4VVEiLCJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjMwMDAiLCJjcm9zc09yaWdpbiI6ZmFsc2V9"
),
"authenticatorAttachment" => "cross-platform",
"getClientExtensionResults" => "",
"id" => "C-4WjulifnXA7CXCsb-7Xg",
"type" => "public-key",
"dns" => "blockid-trial.1kosmos.net"
);
$attestationResultResponse = BIDWebAuthn::submitAttestationResult($tenantInfo, $resultRequest);
?>
BIDTenantInfo tenantInfo = new BIDTenantInfo("blockid-trial.1kosmos.net", "devx", "24b4e0df-29ed-488d-bfe1-000000000000");
BIDAttestationResultValue attestationResultRequest = new BIDAttestationResultValue();
attestationResultRequest.rawId = "C-4WjulifnXA7CXCsb-7Xg";
attestationResultRequest.response = "o2NmbXRmcGFja2VkZ2F0dFN0bXSjY2FsZyZjc2lnWEYwRAIgOfSsUdb_JXdEfR5u4StcbGkxa546MBqbPw1A1H6F7CgCIDkka7ikVaNPdgq75f7plZUTYWwxHUQlNBmc9g5CAGOFY3g1Y4FZAsIwggK-MIIBpqADAgECAgRbFqi2MA0GCSqGSIb3DQEBCwUAMC4xLDAqBgNVBAMTI1l1YmljbyBVMkYgUm9vdCBDQSBTZXJpYWwgNDU3MjAwNjMxMCAXDTE0MDgwMTAwMDAwMFoYDzIwNTAwOTA0MDAwMDAwWjBvMQswCQYDVQQGEwJTRTESMBAGA1UECgwJWXViaWNvIEFCMSIwIAYDVQQLDBlBdXRoZW50aWNhdG9yIEF0dGVzdGF0aW9uMSgwJgYDVQQDDB9ZdWJpY28gVTJGIEVFIFNlcmlhbCAxNTI4MjExNjM4MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE6VGEMwI5_-3OVyN2VxRHG9LtRT4IyhAB-2PGEVAfKqAyD1bDFKE34dhZDimKpi5vVikfHdkx1YRdRlXA_qq-VaNsMGowIgYJKwYBBAGCxAoCBBUxLjMuNi4xLjQuMS40MTQ4Mi4xLjEwEwYLKwYBBAGC5RwCAQEEBAMCBDAwIQYLKwYBBAGC5RwBAQQEEgQQFJogIY72QTOWuIH41bfx9TAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCnqCd5BmJXpxn3dSRRp6SMrCL_D4MVn9m6CMyeOpmIeZHSR8_YASr-08RH6-iT8WKf1NbWyPgEa1WM2yJR84WpuV_ekk_HHAce6tZL_5DKgSPFAC3E16rBiK0D5p29Koaz2I8KZsrO2IoNOgaW_3s048xSS9qqtfwme5AC7AdvX-ifoOKNDGw8zz4hypgzAoNV5whdnM402RfjK7DvdcHkk4DwarDhiZHDh-7sNejTruo7AE8LnzQeA7k-MRyxwGEyzdyf3mUPzTrIRg0EkFWU__Ui0zrVfMyPlBC16JQBE-OT1rddTddfAalXULzadGdVi7_dR4AvHrucqcKbPEBRaGF1dGhEYXRhWKJJlg3liA6MaHQ0Fw9kdmBbj-SuuaKGMseZXPO6gx2XY8UAAAAEFJogIY72QTOWuIH41bfx9QAQC-4WjulifnXA7CXCsb-7XqUBAgMmIAEhWCAlBIW9qW0_9zKSyqHzA0mkw9MoboPiipO4PIgIznj32CJYION6_VfWiEtwvHrtuUEGT6JQnA94E69XoxZKz_RlnKcvoWtjcmVkUHJvdGVjdAI";
attestationResultRequest.authenticatorAttachment = "cross-platform";
attestationResultRequest.getClientExtensionResults = "";
attestationResultRequest.id = "C-4WjulifnXA7CXCsb-7Xg";
attestationResultRequest.type = "public-key";
attestationResultRequest.dns = "blockid-trial.1kosmos.net";
BIDAttestationResultData attestationResultResponse = BIDWebAuthn.submitAttestationResult(tenantInfo, attestationResultRequest);
BIDAttestationResultValue attestationResultRequest = new BIDAttestationResultValue
{
rawId = "C-4WjulifnXA7CXCsb-7Xg",
response = new BIDAttestationResultResponseValue()
{
attestationObject = "o2NmbXRmcGFja2VkZ2F0dFN0bXSjY2FsZyZjc2lnWEYwRAIgOfSsUdb_JXdEfR5u4StcbGkxa546MBqbPw1A1H6F7CgCIDkka7ikVaNPdgq75f7plZUTYWwxHUQlNBmc9g5CAGOFY3g1Y4FZAsIwggK-MIIBpqADAgECAgRbFqi2MA0GCSqGSIb3DQEBCwUAMC4xLDAqBgNVBAMTI1l1YmljbyBVMkYgUm9vdCBDQSBTZXJpYWwgNDU3MjAwNjMxMCAXDTE0MDgwMTAwMDAwMFoYDzIwNTAwOTA0MDAwMDAwWjBvMQswCQYDVQQGEwJTRTESMBAGA1UECgwJWXViaWNvIEFCMSIwIAYDVQQLDB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ZWNlNURk9hVW81TG1WNVNubFpWelZyU1dwdmFVNHdiSFpPTTJoRlVrWlpNbFZYY0hCWmJEZzBVVEJhUjFOVVl6SmFTRTVSWkd4U2JFMXRNVVpUVkZKU1RqQmtNbFJxYURaUFEwbHpTVzFHTVZwRFNUWkpiWGgyV1RKR2MyRkhPWHBrUTBselNXNU9NVmxwU1RaSmJYQnNZbTFzZW1GRE1IaEphWGRwV1ZoV01HRklUbXhpUjFacVpFZHNkbUpwU1RaSmFVbHpTVzFHTUdSSFZucGtSMFl3WVZjNWRVbHFiMmxhUjJ4NVdsZE9NRWxwZDJsaFYxRnBUMmxKZEZONldUTldWVFZyWVRGU1JGRnRPV3RSVkZwTFRqTlZNV1ZzUmpObFJGWlpWVEJWZW1GdVVtaGlWR1JUV2xob1ZsUnRPWEJVU0dSV1NXbDNhVnBZYUhkSmFtOTRUbXBSTlU1cVl6Tk9hazE2WmxFdVUzY3RORVZPUVUxclgwWmxTalJUY1hkWFpWaEplakZEVGxGS2REWlBkbGxhZG5aV1NqRlJOMEl4VVEiLCJvcmlnaW4iOiJodHRwOi8vbG9jYWxob3N0OjMwMDAiLCJjcm9zc09yaWdpbiI6ZmFsc2V9",
getAuthenticatorData = {},
getPublicKey = {},
getPublicKeyAlgorithm = {},
getTransports = {},
},
authenticatorAttachment = "cross-platform",
getClientExtensionResults = "",
id = "C-4WjulifnXA7CXCsb-7Xg",
type = "public-key",
dns = "blockid-trial.1kosmos.net"
};
BIDAttestationResultData attestationResultResponse = BIDWebAuthn.SubmitAttestationResult(bidTenantInfo, attestationResultRequest);
Example Registration Result Response
{
"sub":"john.doe",
"errorMessage":"",
"status":"ok"
}