Web authentication easy public key access
AuthenticatorAttestationResponse インターフェースの getAuthenticatorData() メソッドは、AuthenticatorAttestationResponse.attestationObject プロパティ内に含まれる認証データを含む ArrayBuffer を返します。
これは、attestationObject から認証データを抽出するために余分なパースコードを書くことなく、認証データに簡単にアクセスできるように作成された、便利な関数です。
対応ブラウザ
| 機能 | デスクトップ | モバイル | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 85 | 85 | 119 | 16 | 85 | 16 | |
| AuthenticatorAttestationResponse インターフェースの getPublicKey() メソッドは、新しい資格情報の DER 形式の SubjectPublicKeyInfo を格納した ArrayBuffer を返します(Subject Public Key Info を参照)。これが利用できない場合は null を返します。 | 85 | 85 | 119 | 16 | 85 | 16 |
| AuthenticatorAttestationResponse インターフェースの getPublicKeyAlgorithm() メソッドは、新しい資格情報に使用される暗号アルゴリズムを表す COSE アルゴリズム識別子と等しい数値を返します。 | 85 | 85 | 119 | 16 | 85 | 16 |
基本構文
JAVASCRIPT
getAuthenticatorData() 実務での使いどころ
-
Web authentication easy public key access の活用
AuthenticatorAttestationResponse インターフェースの getAuthenticatorData() メソッドは、AuthenticatorAttestationResponse.attestationObject プロパティ内に含まれる認証データを含む ArrayBuffer を返します。
注意点
- 古いブラウザでは対応していない場合がある。
実装メモ
- 一部の API はセキュアコンテキスト (HTTPS) やユーザー操作起点を必要とする。利用前に要件を確認すること。