Method: vdc.getCredentialStatus

用於擷取憑證目前狀態的端點。

HTTP 要求

POST https://example.issuer.com/api/v1/vdc/getCredentialStatus

要求主體

要求主體會包含結構如下的資料:

JSON 表示法
{
  "requestMetadata": {
    object (RequestMetadata)
  },
  "deviceReferenceId": string,
  "credentialId": string
}
欄位
requestMetadata

object (RequestMetadata)

所有要求都必須提供的要求中繼資料。

deviceReferenceId

string

與裝置和裝置相關聯的身分識別金鑰相應的 ID。這並非裝置 ID,也就是說,如果使用者在同一部裝置上擁有兩組不同的憑證,這兩個憑證的 ID 就會不同。

所有要求都會提供這個 ID,可用於建立要求之間的關聯。

credentialId

string

呼叫者要求狀態的憑證 ID。

回應主體

包含憑證目前狀態的回應。

如果成功,回應主體會含有以下結構的資料:

JSON 表示法
{
  "responseMetadata": {
    object (ResponseMetadata)
  },
  "credentialStatus": {
    object (CredentialStatus)
  },
  "credentialVersionId": string
}
欄位
responseMetadata

object (ResponseMetadata)

回應的中繼資料,所有回應都必須提供。

credentialStatus

object (CredentialStatus)

憑證的目前狀態。

credentialVersionId

string

目前版本的憑證。新版憑證推出後,這項資訊預計會變更。舉例來說,如果使用者更新憑證上的地址,底層的 mdoc 就會過時,這時就會變更。

CredentialStatus

代表憑證可擁有的不同狀態的物件。

JSON 表示法
{
  "userActionRequired": {
    object (UserActionRequired)
  },

  // Union field status can be only one of the following:
  "provisionPending": {
    object (ProvisionPending)
  },
  "active": {
    object (Active)
  },
  "revoked": {
    object (Revoked)
  },
  "deleted": {
    object (Deleted)
  }
  // End of list of possible types for union field status.
}
欄位
userActionRequired

object (UserActionRequired)

使用者必須採取行動,以免憑證進入限制較多的狀態 (例如 ACTIVE -> REVOKED)。

聯集欄位 status。其中一個包含憑證可能有的不同狀態。status 只能是下列其中一項:
provisionPending

object (ProvisionPending)

代表可擷取的憑證,但尚未提供 Provisioning 證明。如果要求未包含更新的 ProofOfProvisioning,對處於此狀態的憑證發出的任何 vdc.provisionMobileSecurityObjects 呼叫都會失敗。憑證建立時,以及有新版憑證可用時,憑證會進入這個狀態。如果是新版憑證,錢包必須重新佈建憑證,並提供 ProofOfProvisioning,才能恢復 ACTIVE 狀態。

active

object (Active)

代表有效且可用的憑證。只有處於「有效」狀態的憑證才能擷取 MSO。

revoked

object (Revoked)

代表處於最終不可用狀態的憑證。這項憑證日後無法再使用。這個狀態與 DELETED 類似,但只能由發行者設定。

deleted

object (Deleted)

代表曾經佈建但已從裝置刪除的憑證。這個狀態與「已撤銷」類似,但只能由錢包設定。

ProvisionPending

這個類型沒有任何欄位。

代表憑證待處理狀態的物件。這則訊息目前刻意留白,日後可能會新增欄位。

有效

這個類型沒有任何欄位。

代表有效憑證狀態的物件。這則訊息目前刻意留白,日後可能會新增欄位。

已撤銷

這個類型沒有任何欄位。

代表已撤銷憑證狀態的物件。這則訊息目前刻意留白,日後可能會新增欄位。

已刪除

這個類型沒有任何欄位。

代表已刪除憑證狀態的物件。這則訊息目前刻意留白,日後可能會新增欄位。

UserActionRequired

代表使用者需要完成的工作 / 動作的物件。

JSON 表示法
{
  "deadlineTimeMillis": string,
  "deadlineEnforcementHint": {
    object (EnforcementHint)
  },

  // Union field action can be only one of the following:
  "submitProofing": {
    object (SubmitProofing)
  }
  // End of list of possible types for union field action.
}
欄位
deadlineTimeMillis

string (int64 format)

動作到期時的紀元時間,發行者應將憑證移至限制較多的狀態。用戶端會使用這項資訊,提醒使用者必須在何時完成動作,但發行者可自行決定是否強制執行限制。

deadlineEnforcementHint

object (EnforcementHint)

提示:說明發行者如何強制執行動作的期限。

聯集欄位 action。使用者需要完成的動作。action 只能是下列其中一項:
submitProofing

object (SubmitProofing)

提交憑證證明。

EnforcementHint

提示:說明發卡機構如何強制執行必要動作。

JSON 表示法
{

  // Union field hint can be only one of the following:
  "revocationHint": {
    object (RevocationHint)
  }
  // End of list of possible types for union field hint.
}
欄位
聯集欄位 hint。強制執行提示類型。hint 只能是下列其中一項:
revocationHint

object (RevocationHint)

憑證將由核發機構撤銷。

RevocationHint

這個類型沒有任何欄位。

憑證將由核發機構撤銷。

SubmitProofing

校對狀態詳細資料。

JSON 表示法
{

  // Union field ProofingAllowance can be only one of the following:
  "limitedAttempts": {
    object (LimitedAttempts)
  },
  "unlimitedAttempts": {
    object (UnlimitedAttempts)
  }
  // End of list of possible types for union field ProofingAllowance.
}
欄位
聯集欄位 ProofingAllowance。目前憑證的驗證嘗試次數。ProofingAllowance 只能是下列其中一項:
limitedAttempts

object (LimitedAttempts)

使用者提交校對的次數有限。

unlimitedAttempts

object (UnlimitedAttempts)

使用者可無限次提交校對結果。發卡機構不建議這麼做。

LimitedAttempts

使用者提交校對的次數有限。

JSON 表示法
{
  "remainingAttempts": integer,
  "maxAttempts": integer,
  "maxAttemptsEnforcementHint": {
    object (EnforcementHint)
  }
}
欄位
remainingAttempts

integer

剩餘的校對提交次數。這項功能僅用於顯示 UX 訊息,Google 錢包不會對這組號碼採取任何行動。

maxAttempts

integer

提交校對的次數已達上限。這項功能僅用於顯示 UX 訊息,Google 錢包不會對這組號碼採取任何行動。

maxAttemptsEnforcementHint

object (EnforcementHint)

提示:說明發卡機構如何強制執行最大嘗試次數。

UnlimitedAttempts

這個類型沒有任何欄位。

使用者可無限次提交校對結果。發卡機構不建議這麼做。