ClientAssertion class
機密客戶端流程中使用的 jwt 承載型別的客戶斷言
方法
| from |
將 ClientAssertion 類別初始化為使用者傳遞的 clientAssertion |
| from |
|
| from |
將 ClientAssertion 類別初始化為使用者傳遞的憑證 |
| get |
更新憑證式 clientAssertion,若使用者已通過,則直接使用憑證 |
| parse |
從給定的憑證字串中擷取原始憑證,並以陣列回傳。 |
方法詳細資料
fromAssertion(string)
將 ClientAssertion 類別初始化為使用者傳遞的 clientAssertion
static function fromAssertion(assertion: string): ClientAssertion
參數
- assertion
-
string
傳回
fromCertificate(string, string, string)
警告
此 API 現已淘汰。
Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint Initialize the ClientAssertion class from the certificate passed by the user
static function fromCertificate(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion
參數
- thumbprint
-
string
憑證識別碼
- privateKey
-
string
祕密金鑰
- publicCertificate
-
string
提供電子文件以證明公鑰的所有權
傳回
fromCertificateWithSha256Thumbprint(string, string, string)
將 ClientAssertion 類別初始化為使用者傳遞的憑證
static function fromCertificateWithSha256Thumbprint(thumbprint: string, privateKey: string, publicCertificate?: string): ClientAssertion
參數
- thumbprint
-
string
憑證識別碼
- privateKey
-
string
祕密金鑰
- publicCertificate
-
string
提供電子文件以證明公鑰的所有權
傳回
getJwt(CryptoProvider, string, string)
更新憑證式 clientAssertion,若使用者已通過,則直接使用憑證
function getJwt(cryptoProvider: CryptoProvider, issuer: string, jwtAudience: string): string
參數
- cryptoProvider
- CryptoProvider
圖書館的加密助手
- issuer
-
string
國際太空站主張
- jwtAudience
-
string
AUD 索賠
傳回
string
parseCertificate(string)
從給定的憑證字串中擷取原始憑證,並以陣列回傳。
static function parseCertificate(publicCertificate: string): string[]
參數
- publicCertificate
-
string
提供電子文件以證明公鑰的所有權
傳回
string[]