คุณกำลังดูเอกสารประกอบ Apigee Edge
ไปที่
เอกสารประกอบเกี่ยวกับ Apigee X. ข้อมูล
UserNameRequired
ข้อความแสดงข้อผิดพลาด
การทำให้พร็อกซี API ใช้งานได้ผ่าน Edge UI หรือ Edge Management API จะล้มเหลวโดยมีข้อความแสดงข้อผิดพลาดต่อไปนี้
Error Deploying Revision revision_number to env_name BasicAuthenticationPolicy: Username element must be present for operation operation.
ตัวอย่างข้อความแสดงข้อผิดพลาด
Error Deploying Revision 2 to test
BasicAuthenticationPolicy: Username element must be present for Encode operation.
ภาพหน้าจอตัวอย่าง

สาเหตุ
การทำให้พร็อกซี API ใช้งานได้จะล้มเหลวหากไม่ได้กำหนดองค์ประกอบ <User> ในนโยบาย BasicAuthentication จำเป็นต้องมีองค์ประกอบ <User> สำหรับทั้งการดำเนินการเข้ารหัสและการถอดรหัส
การวินิจฉัย
ตรวจสอบนโยบาย BasicAuthentication ทั้งหมดที่ใช้ในพร็อกซี API หากมีนโยบายที่ไม่ได้ระบุองค์ประกอบ
<User>นั่นเป็นสาเหตุของข้อผิดพลาด ต้องระบุองค์ประกอบ<User>ในนโยบาย BasicAuthentication สำหรับการดำเนินการเข้ารหัสหรือถอดรหัสตัวอย่างนโยบาย BasicAuthentication ที่แสดงด้านล่างใช้สำหรับการดำเนินการเข้ารหัส แต่ไม่ได้กำหนดองค์ประกอบ
<User>ไว้<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <BasicAuthentication name="ApplyBasicAuthHeader"> <DisplayName>ApplyBasicAuthHeader</DisplayName> <Operation>Encode</Operation> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <Password ref="BasicAuth.credentials.password"/> <AssignTo createNew="false">request.header.Authorization</AssignTo> </BasicAuthentication>ติดตั้งใช้งานไม่สำเร็จเนื่องจากมีข้อผิดพลาดต่อไปนี้
BasicAuthenticationPolicy: Username element must be present for Encode operation.
ความละเอียด
ตรวจสอบว่าได้กำหนดเอลิเมนต์ <User> ภายในนโยบาย BasicAuthentication สำหรับการดำเนินการเข้ารหัสหรือถอดรหัส
หากต้องการแก้ไขตัวอย่างที่แสดงข้างต้น ให้ใส่เอลิเมนต์ <User> ภายในนโยบายดังที่แสดงด้านล่าง
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<BasicAuthentication name="ApplyBasicAuthHeader">
<DisplayName>ApplyBasicAuthHeader</DisplayName>
<Operation>Encode</Operation>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
<User ref="BasicAuth.credentials.username"/>
<Password ref="BasicAuth.credentials.password"/>
<AssignTo createNew="false">request.header.Authorization</AssignTo>
</BasicAuthentication>
PasswordRequired
ข้อความแสดงข้อผิดพลาด
การทำให้พร็อกซี API ใช้งานได้ผ่าน Edge UI หรือ Edge Management API จะล้มเหลวโดยมีข้อความแสดงข้อผิดพลาดต่อไปนี้
Error Deploying Revision revision_number to env_name BasicAuthenticationPolicy: Password element must be present for operation operation.
ตัวอย่างข้อความแสดงข้อผิดพลาด
Error Deploying Revision 2 to test
BasicAuthenticationPolicy: Password element must be present for Encode operation.
ภาพหน้าจอตัวอย่าง

สาเหตุ
การทำให้พร็อกซี API ใช้งานได้จะล้มเหลวหากไม่ได้กำหนดองค์ประกอบ <Password> ในนโยบาย BasicAuthentication จำเป็นต้องมีองค์ประกอบ <Password> สำหรับทั้งการดำเนินการเข้ารหัสและการถอดรหัส
การวินิจฉัย
ตรวจสอบนโยบาย BasicAuthentication ทั้งหมดที่ใช้ในพร็อกซี API หากมีนโยบายที่ไม่ได้กําหนดองค์ประกอบ
<Password>นั่นคือสาเหตุของข้อผิดพลาด ต้องระบุองค์ประกอบ<Password>ในนโยบาย BasicAuthentication สำหรับการดำเนินการเข้ารหัสหรือถอดรหัสตัวอย่างนโยบาย BasicAuthentication ที่แสดงด้านล่างใช้สำหรับการดำเนินการเข้ารหัส แต่ไม่ได้กำหนดองค์ประกอบ
<Password>ไว้<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <BasicAuthentication name="ApplyBasicAuthHeader"> <DisplayName>ApplyBasicAuthHeader</DisplayName> <Operation>Encode</Operation> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <User ref="BasicAuth.credentials.username"/> <AssignTo createNew="false">request.header.Authorization</AssignTo> </BasicAuthentication>ติดตั้งใช้งานไม่สำเร็จเนื่องจากมีข้อผิดพลาดต่อไปนี้
BasicAuthenticationPolicy: Password element must be present for Encode operation.
ความละเอียด
ตรวจสอบว่าได้กำหนดเอลิเมนต์ <Password> ภายในนโยบาย BasicAuthentication สำหรับการดำเนินการเข้ารหัสหรือถอดรหัส
หากต้องการแก้ไขตัวอย่างที่แสดงข้างต้น ให้ใส่เอลิเมนต์ <Password> ภายในนโยบายดังที่แสดงด้านล่าง
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<BasicAuthentication name="ApplyBasicAuthHeader">
<DisplayName>ApplyBasicAuthHeader</DisplayName>
<Operation>Encode</Operation>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
<User ref="BasicAuth.credentials.username"/>
<Password ref="BasicAuth.credentials.password"/>
<AssignTo createNew="false">request.header.Authorization</AssignTo>
</BasicAuthentication>
AssignToRequired
ข้อความแสดงข้อผิดพลาด
การทำให้พร็อกซี API ใช้งานได้ผ่าน Edge UI หรือ Edge Management API จะล้มเหลวโดยมีข้อความแสดงข้อผิดพลาดต่อไปนี้
Error Deploying Revision revision_number to env_name BasicAuthenticationPolicy: AssignTo element must be present for operation operation.
ตัวอย่างข้อความแสดงข้อผิดพลาด
Error Deploying Revision 2 to test
BasicAuthenticationPolicy: AssignTo element must be present for Encode operation.
ภาพหน้าจอตัวอย่าง

สาเหตุ
การทำให้พร็อกซี API ใช้งานได้จะล้มเหลวหากไม่ได้กำหนดองค์ประกอบ <AssignTo> ในนโยบาย BasicAuthentication จำเป็นต้องมีองค์ประกอบ <AssignTo> สำหรับทั้งการดำเนินการเข้ารหัสและการถอดรหัส
การวินิจฉัย
ตรวจสอบนโยบาย BasicAuthentication ทั้งหมดที่ใช้ในพร็อกซี API หากมีนโยบายที่ไม่ได้กำหนดองค์ประกอบ
<AssignTo>ไว้ นี่คือสาเหตุของข้อผิดพลาด ต้องระบุองค์ประกอบ<AssignTo>ในนโยบาย BasicAuthentication สำหรับทั้งการดำเนินการเข้ารหัสและการถอดรหัสตัวอย่างนโยบาย BasicAuthentication ที่แสดงด้านล่างใช้สำหรับการดำเนินการเข้ารหัส แต่ไม่ได้กำหนดองค์ประกอบ
<AssignTo>ไว้<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <BasicAuthentication name="ApplyBasicAuthHeader"> <DisplayName>ApplyBasicAuthHeader</DisplayName> <Operation>Encode</Operation> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <User ref="BasicAuth.credentials.username"/> <Password ref="BasicAuth.credentials.password"/> </BasicAuthentication>ติดตั้งใช้งานไม่สำเร็จเนื่องจากมีข้อผิดพลาดต่อไปนี้
BasicAuthenticationPolicy: AssignTo element must be present for Encode operation.
ความละเอียด
ตรวจสอบว่าได้กำหนดเอลิเมนต์ <AssignTo> ภายในนโยบาย BasicAuthentication สำหรับการดำเนินการเข้ารหัสหรือถอดรหัส
หากต้องการแก้ไขตัวอย่างที่แสดงข้างต้น ให้ใส่เอลิเมนต์ <AssignTo> ภายในนโยบายดังที่แสดงด้านล่าง
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<BasicAuthentication name="ApplyBasicAuthHeader">
<DisplayName>ApplyBasicAuthHeader</DisplayName>
<Operation>Encode</Operation>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
<User ref="BasicAuth.credentials.username"/>
<Password ref="BasicAuth.credentials.password"/>
<AssignTo createNew="false">request.header.Authorization</AssignTo>
</BasicAuthentication>
SourceRequired
ข้อความแสดงข้อผิดพลาด
การทำให้พร็อกซี API ใช้งานได้ผ่าน Edge UI หรือ Edge Management API จะล้มเหลวโดยมีข้อความแสดงข้อผิดพลาดต่อไปนี้
Error Deploying Revision revision_number to env_name BasicAuthenticationPolicy: Source element must be present for Decode operation.
ตัวอย่างข้อความแสดงข้อผิดพลาด
Error Deploying Revision 2 to test
BasicAuthenticationPolicy: Source element must be present for Decode operation.
ภาพหน้าจอตัวอย่าง

สาเหตุ
การทำให้พร็อกซี API ใช้งานได้จะล้มเหลวหากไม่ได้กำหนดองค์ประกอบ <Source> ในนโยบาย BasicAuthentication ที่ใช้สำหรับการถอดรหัส ต้องระบุองค์ประกอบ <Source> หากระบุ <Operation> เป็น Decode ในนโยบาย BasicAuthentication
การวินิจฉัย
ตรวจสอบนโยบาย BasicAuthentication ทั้งหมดที่ใช้ในพร็อกซี API หากมีนโยบายใดๆ ที่ไม่ได้กําหนดองค์ประกอบ
<Source>และองค์ประกอบ<Operation>กําหนดเป็นDecodeนั่นก็คือสาเหตุของข้อผิดพลาด ต้องระบุองค์ประกอบ<Source>หากระบุ<Operation>เป็นDecodeในนโยบาย BasicAuthenticationตัวอย่างนโยบาย BasicAuthentication ที่แสดงด้านล่างใช้สำหรับการดำเนินการ
Decodeแต่ไม่ได้กำหนดองค์ประกอบ<Source>ไว้<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <BasicAuthentication name="ApplyBasicAuthHeader"> <DisplayName>ApplyBasicAuthHeader</DisplayName> <Operation>Decode</Operation> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> <User ref="BasicAuth.credentials.username"/> <Password ref="BasicAuth.credentials.password"/> <AssignTo createNew="false">request.header.Authorization</AssignTo> </BasicAuthentication>ติดตั้งใช้งานไม่สำเร็จเนื่องจากมีข้อผิดพลาดต่อไปนี้
BasicAuthenticationPolicy: Source element must be present for Decode operation.
ความละเอียด
ตรวจสอบว่าได้กำหนดองค์ประกอบ <Source> ในนโยบาย BasicAuthentication เมื่อใช้สำหรับการดำเนินการ Decode
หากต้องการแก้ไขตัวอย่างที่แสดงข้างต้น ให้ใส่เอลิเมนต์ <Source> ภายในนโยบายดังที่แสดงด้านล่าง
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<BasicAuthentication name="ApplyBasicAuthHeader">
<DisplayName>ApplyBasicAuthHeader</DisplayName>
<Operation>Decode</Operation>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
<User ref="BasicAuth.credentials.username"/>
<Password ref="BasicAuth.credentials.password"/>
<AssignTo createNew="false">request.header.Authorization</AssignTo>
<Source>request.header.Authorization</Source>
</BasicAuthentication>