解碼 JWT 政策部署錯誤
查看 Apigee Edge 說明文件。
前往
Apigee X說明文件。 資訊
InvalidEmptyElement
錯誤訊息
無法透過 Edge UI 或 Edge Management API 部署 API Proxy
錯誤訊息:
Error Saving Revision
Invalid empty element : policy(policy_name) element(Source)
錯誤訊息示例
Error Saving Revision
Invalid empty element : policy(Decode_JWT) element(Source).
螢幕截圖範例
邊緣 UI 中會顯示錯誤訊息:
原因
如果包含需要解碼 JWT 的流程變數,就會發生這個錯誤
未在 DecodeJWT 政策的 <Source>
元素中指定。
舉例來說,如果 <Source>
元素不含
值,如下所示:
<Source></Source>
診斷
找出 DecodeJWT 政策名稱以及錯誤訊息中空白的元素名稱。舉例來說,在下列錯誤訊息中,DecodeJWT 政策名稱為 Decode_JWT
,元素名稱為 Source
。
Invalid empty element : policy(Decode_JWT) element(Source).
檢查 DecodeJWT 政策,並確認步驟 1 識別的元素是否為空白。如果元素沒有任何內容,就是發生錯誤的原因。
以下是 DecodeJWT 政策範例:
<DecodeJWT name="Decode_JWT">
<DisplayName>JWT Decode HS256</DisplayName>
<Source></Source>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
</DecodeJWT>
由於 <Source>
元素沒有任何內容,您會收到以下錯誤:
Invalid empty element : policy(Decode_JWT) element(Source).
解析度
確認 <Source>
元素在流程變數中指定有效的 JWT。
如要修正 DecodeJWT 政策範例的問題,您可以在 <Source>
元素中指定含有有效 JWT 的流程變數。
<DecodeJWT name="Decode_JWT">
<DisplayName>JWT Decode HS256</DisplayName>
<Source>var.jwt</Source>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
</DecodeJWT>
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-12 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
{"lastModified": "\u4e0a\u6b21\u66f4\u65b0\u6642\u9593\uff1a2024-09-12 (\u4e16\u754c\u6a19\u6e96\u6642\u9593)\u3002"}
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-09-12 (世界標準時間)。"],[],[]]