นโยบาย AccessEntity

คุณกำลังดูเอกสารประกอบของ Apigee Edge
ไปที่เอกสารประกอบของ Apigee X
ข้อมูล

อะไร

เรียกโปรไฟล์เอนทิตีที่คุณระบุจากที่เก็บข้อมูล Apigee Edge นโยบายจะวางโปรไฟล์ไว้ในตัวแปรที่มีชื่อตามรูปแบบ AccessEntity.{policy_name} คุณสามารถใช้ AccessEntity เพื่อเข้าถึงโปรไฟล์สำหรับเอนทิตีต่อไปนี้ได้

  • แอป
  • ผลิตภัณฑ์ API
  • บริษัท
  • นักพัฒนาของบริษัท
  • รหัสผู้ใช้
  • นักพัฒนาแอป

นโยบาย AccessEntity ทำหน้าที่เป็นการค้นหาฐานข้อมูลรันไทม์ตามนโยบาย คุณสามารถใช้ข้อมูลโปรไฟล์ที่นโยบายนี้แสดงผลเพื่อเปิดใช้ลักษณะการทำงานแบบไดนามิก เช่น การกำหนดเส้นทางปลายทางแบบมีเงื่อนไข การดำเนินการโฟลว์ การบังคับใช้นโยบาย

คุณใช้นโยบาย AccessEntity เพื่อรับข้อมูลโปรไฟล์เอนทิตีเป็น XML และใส่ลงในตัวแปร คุณระบุเอนทิตีที่จะรับได้โดยการระบุประเภทเอนทิตีและตัวระบุอย่างน้อย 1 รายการที่ระบุเอนทิตีประเภทนั้นๆ ที่คุณต้องการ หลังจากนั้นในนโยบายอื่น คุณจะเรียกข้อมูลโปรไฟล์เอนทิตีด้วยนโยบายอื่น เช่น นโยบาย ExtractVariable หรือ นโยบาย AssignMessage ได้

ลองฟัง

ตัวอย่างต่อไปนี้แสดง AccessEntity ที่ใช้ร่วมกับนโยบาย ExtractVariables และ AssignMessage เพื่อดึงอีเมลของนักพัฒนาแอปและเพิ่มอีเมลลงในส่วนหัวของ HTTP

การรับอีเมลจากนักพัฒนาแอปเพื่อใช้ในนโยบายอื่นๆ

ตั้งค่านโยบาย AccessEntity เพื่อระบุโปรไฟล์เอนทิตีที่จะรับจาก Edge รวมถึงตำแหน่งที่จะวางข้อมูลโปรไฟล์

ในตัวอย่างต่อไปนี้ นโยบายได้รับโปรไฟล์เอนทิตี developer โดยใช้คีย์ API ที่ส่งผ่านเป็นพารามิเตอร์การค้นหาเพื่อระบุนักพัฒนาแอป โปรไฟล์จะวางในตัวแปรที่มีชื่อตามรูปแบบ AccessEntity.{policy_name} ดังนั้นตัวแปรที่นโยบายนี้กําหนดจะเป็น AccessEntity.GetDeveloperProfile

<AccessEntity name="GetDeveloperProfile">
  <!-- This is the type entity whose profile we need to pull from the Edge datastore. -->
  <EntityType  value="developer"/>
  <!-- We tell the policy to use the API key (presented as query parameter) to identify the developer. -->
  <EntityIdentifier ref="request.queryparam.apikey" type="consumerkey"/> 
</AccessEntity>

ใช้นโยบายอื่นเพื่อดึงค่าโปรไฟล์เอนทิตีจากตัวแปรที่กำหนดโดย AccessEntity

ในตัวอย่างต่อไปนี้ นโยบาย ExtractVariables จะดึงค่าจากตัวแปร AccessEntity.GetDeveloperProfile ที่ตั้งค่าไว้ก่อนหน้านี้โดย AccessEntity

โปรดทราบว่าระบบจะระบุค่าที่ดึงเป็นนิพจน์ XPath ในองค์ประกอบ XMLPayload ค่าที่แยกได้จะวางไว้ในตัวแปร developer.email

<ExtractVariables name="SetDeveloperProfile">
  <!-- The source element points to the variable populated by AccessEntity policy. 
  The format is <policy-type>.<policy-name>.
  In this case, the variable contains the whole developer profile. -->
  <Source>AccessEntity.GetDeveloperProfile</Source> 
  <VariablePrefix>developer</VariablePrefix>
  <XMLPayload>
    <Variable name="email" type="string"> 
        <!-- You parse elements from the developer profile using XPath. -->
      <XPath>/Developer/Email</XPath>
    </Variable>
  </XMLPayload>
</ExtractVariables>

นโยบาย AssignMessage ต่อไปนี้จะเรียกอีเมลของนักพัฒนาซอฟต์แวร์ซึ่งกำหนดโดยนโยบาย ExtractVariable

<!-- We'll use this policy to return the variables set in the developer profile, 
just so that we can easily see them in the response. -->
<AssignMessage name="EchoVariables">
  <AssignTo createNew="false" type="response"></AssignTo>
  <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
  <Set>
    <Headers>
      <Header name="X-Developer-email">{developer.email}</Header>
    </Headers>
  </Set>
</AssignMessage>

การอ้างอิงองค์ประกอบ

โครงสร้างพื้นฐานของนโยบาย AccessEntity คือ

<AccessEntity name="policy_name">
  <EntityType  value="entity_type"/>
  <EntityIdentifier ref="entity_identifier" type="identifier_type"/> 
  <SecondaryIdentifier ref="secondary_identifier" type="identifier_type"/>
</AccessEntity>

คุณเข้าถึงหลายเอนทิตีที่เป็นประเภทเดียวกันได้โดยจัดกลุ่มเอนทิตีในองค์ประกอบ Identifiers ดังนี้

<AccessEntity name="name_of_the_policy">
  <EntityType  value="type_of_entity"/>
  <Identifiers>
    <Identifier>
      <EntityIdentifier ref="reference_to_entity_identifier" type*="identifier_type"/> 
      <SecondaryIdentifier ref="reference_to_secondary_entity_identifier" type="identifier_type"/><!-- optional -->
    </Identifier >
    <Identifier>
      <EntityIdentifier ref="reference_to_entity_identifier" type*="identifier_type"/> 
      <SecondaryIdentifier ref="reference_to_secondary_entity_identifier" type="identifier_type"/><!-- optional -->
    </Identifier >
  </Identifiers>
</AccessEntity>

แอตทริบิวต์ <AccessEntity>

<AccessEntity async="false" continueOnError="false" enabled="true" name="policy_name">

ตารางต่อไปนี้อธิบายแอตทริบิวต์ที่ใช้ร่วมกันในองค์ประกอบระดับบนสุดของนโยบายทั้งหมด

แอตทริบิวต์ คำอธิบาย ค่าเริ่มต้น การมีบุคคลอยู่
name

ชื่อภายในของนโยบาย ค่าของแอตทริบิวต์ name มีตัวอักษร ตัวเลข ช่องว่าง ขีดกลาง ขีดล่าง และจุด ค่านี้ต้องมีอักขระไม่เกิน 255 ตัว

(ไม่บังคับ) ใช้องค์ประกอบ <DisplayName> เพื่อติดป้ายกำกับนโยบายในเครื่องมือแก้ไขพร็อกซี UI การจัดการด้วยชื่อที่เป็นภาษาธรรมชาติที่แตกต่างออกไป

ไม่มีข้อมูล จำเป็น
continueOnError

ตั้งค่าเป็น false เพื่อแสดงผลข้อผิดพลาดเมื่อนโยบายล้มเหลว ซึ่งถือเป็นเรื่องปกติสำหรับนโยบายส่วนใหญ่

ตั้งค่าเป็น true เพื่อให้การดำเนินการโฟลว์ดำเนินต่อไปได้แม้ว่านโยบายจะล้มเหลวก็ตาม

false ไม่บังคับ
enabled

ตั้งค่าเป็น true เพื่อบังคับใช้นโยบาย

ตั้งค่าเป็น false เพื่อปิดนโยบาย ระบบจะไม่บังคับใช้นโยบายแม้ว่าจะยังแนบอยู่กับขั้นตอนก็ตาม

จริง ไม่บังคับ
async

แอตทริบิวต์นี้เลิกใช้งานแล้ว

false เลิกใช้

องค์ประกอบ <DisplayName>

ใช้เพิ่มเติมจากแอตทริบิวต์ name เพื่อติดป้ายกำกับนโยบายในเครื่องมือแก้ไขพร็อกซี UI การจัดการด้วยชื่อที่เป็นภาษาธรรมชาติที่แตกต่างออกไป

<DisplayName>Policy Display Name</DisplayName>
ค่าเริ่มต้น

ไม่มีข้อมูล

หากคุณไม่ใส่องค์ประกอบนี้ ระบบจะใช้ค่าของแอตทริบิวต์ name ของนโยบาย

การมีบุคคลอยู่ ไม่บังคับ
Type สตริง

อีลิเมนต์ <EntityIdentifier>

ระบุเอนทิตีเฉพาะ ซึ่งเป็นประเภทที่ระบุใน EntityType ที่ต้องการรับ

<EntityIdentifier ref="value_variable" type="identifier_type"/> 

ค่าเริ่มต้น

ไม่มีข้อมูล

การปรากฏ

จำเป็น

ประเภท

สตริง

Attributes

แอตทริบิวต์ คำอธิบาย ค่าเริ่มต้น การมีบุคคลอยู่ Type
อ้างอิง

ตัวแปรที่ให้แหล่งที่มาของตัวระบุ เช่น request.queryparam.apikey

ไม่มีข้อมูล ต้องระบุ สตริง
ประเภท ประเภทที่ตัวแปรในแอตทริบิวต์อ้างอิง เช่น consumerkey ดูรายการค่าได้ในประเภทเอนทิตีและตัวระบุ ต้องระบุ สตริง

ตัวอย่าง

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AccessEntity async="false" continueOnError="false" enabled="true" name="GetCompany">
    <DisplayName>GetCompanyProfile</DisplayName>
    <EntityType value="company"></EntityType>
    <EntityIdentifier ref="request.queryparam.apikey" type="consumerkey"/>
</AccessEntity>

องค์ประกอบ <EntityType>

ระบุประเภทของเอนทิตีที่จะดึงข้อมูลจากพื้นที่เก็บข้อมูล

<EntityType  value="entity_type"/>

ค่าเริ่มต้น

ไม่มีข้อมูล

การปรากฏ

จำเป็น

ประเภท

สตริง

ใช้องค์ประกอบ EntityIdentifier เพื่อระบุเอนทิตีของประเภทที่ระบุที่คุณต้องการ ดูข้อมูลอ้างอิงประเภทเอนทิตีได้ในประเภทเอนทิตีและตัวระบุ

Attributes

แอตทริบิวต์ คำอธิบาย ค่าเริ่มต้น การมีบุคคลอยู่ Type
value หนึ่งในประเภทเอนทิตีที่รองรับ ดูประเภทเอนทิตีและตัวระบุสำหรับรายการ ไม่มี ต้องระบุ สตริง

อีลิเมนต์ <secondaryIdentifier>

การใช้ร่วมกับ EntityIdentifier ให้ระบุค่าเพื่อระบุอินสแตนซ์ที่ต้องการของ EntityType ที่กำหนด

<SecondaryIdentifier ref="value_variable" type="identifier_type"/>

ค่าเริ่มต้น

ไม่มีข้อมูล

การปรากฏ

ไม่บังคับ

ประเภท

สตริง

การใช้ SecondaryIdentifier เมื่อระบุเฉพาะ EntityIdentifier ไม่ได้เป็นการรับประกันว่าคุณจะได้รับเอนทิตีเดียว ดูข้อมูลเพิ่มเติมในการจำกัดผลลัพธ์ให้แคบลงด้วยตัวระบุรอง

ไม่รองรับการใช้องค์ประกอบ SecondaryIdentifier หลายรายการ

Attributes

แอตทริบิวต์ คำอธิบาย ค่าเริ่มต้น การมีบุคคลอยู่ Type
อ้างอิง

ตัวแปรที่ให้แหล่งที่มาของตัวระบุ เช่น request.queryparam.apikey

ไม่มีข้อมูล ต้องระบุ สตริง
ประเภท ประเภทที่ตัวแปรในแอตทริบิวต์อ้างอิง เช่น consumerkey ดูรายการค่าได้ในประเภทเอนทิตีและตัวระบุ ต้องระบุ สตริง

ตัวอย่าง

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AccessEntity async="false" continueOnError="false" enabled="true" name="GetAPIProduct">
    <DisplayName>GetAPIProduct</DisplayName>
    <EntityType value="apiproduct"></EntityType>
    <EntityIdentifier ref="developer.app.name" type="appname"/> 
    <SecondaryIdentifier ref="developer.id" type="developerid"/> 
</AccessEntity>

หมายเหตุการใช้งาน

การจำกัดผลลัพธ์ด้วยตัวระบุรอง

สำหรับบางเอนทิตี การระบุตัวระบุ 1 รายการอาจไม่เจาะจงพอที่จะได้รับเอนทิตีที่ต้องการ ในกรณีดังกล่าว คุณสามารถใช้ตัวระบุรองเพื่อจำกัดผลลัพธ์ให้แคบลงได้

การกำหนดค่านโยบายแบบกว้างๆ แบบแรกอาจมีลักษณะดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AccessEntity async="false" continueOnError="false" enabled="true" name="GetApp">
    <DisplayName>GetAppProfile</DisplayName>
    <EntityType value="apiproduct"></EntityType>
    <EntityIdentifier ref="request.queryparam.apikey" type="consumerkey"/>
</AccessEntity>

เนื่องจากแอป 1 แอปเชื่อมโยงกับผลิตภัณฑ์ API ได้หลายรายการ การใช้เพียงรหัสแอปอาจไม่ได้ส่งคืนผลิตภัณฑ์ API ที่คุณต้องการ (คุณอาจได้ผลิตภัณฑ์เพียงรายการเดียวจากผลิตภัณฑ์ที่ตรงกันหลายรายการ)

หากต้องการผลลัพธ์ที่แม่นยำมากขึ้น ให้ใช้ SecondaryIdentifier แทน เช่น คุณอาจมีตัวแปร appname และ developerid ในกระบวนการ เนื่องจากระบบจะป้อนข้อมูลเหล่านี้โดยค่าเริ่มต้นในระหว่างการแลกเปลี่ยน OAuth 2.0 คุณใช้ค่าของตัวแปรเหล่านั้นในนโยบาย AccessEntity เพื่อรับรายละเอียดโปรไฟล์ในแอปที่ส่งคำขอได้

การกำหนดค่านโยบายที่เฉพาะเจาะจงมากขึ้นอาจมีลักษณะดังนี้

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AccessEntity async="false" continueOnError="false" enabled="true" name="GetApp">
    <DisplayName>GetAppProfile</DisplayName>
    <EntityType value="apiproduct"></EntityType>
    <EntityIdentifier ref="developer.app.name" type="appname"/> 
    <SecondaryIdentifier ref="developer.id" type="developerid"/> 
</AccessEntity>

ประเภทเอนทิตีและตัวระบุที่รองรับ

AccessEntity รองรับประเภทเอนทิตีและตัวระบุต่อไปนี้

ค่า EntityType ประเภท EntityIdentifier ประเภทตัวระบุรอง
apiproduct appid apiresource
apiproductname
appname apiresource
developeremail
developerid
companyname
consumerkey apiresource
app appid
appname developeremail
developerid
companyname
consumerkey
authorizationcode authorizationcode
company appid
company
consumerkey
companydeveloper companyname
consumerkey consumerkey
consumerkey_scope consumerkey
developer appid
consumerkey
developeremail
developerid
requesttoken requesttoken consumerkey
verifier verifier

ตัวอย่าง XML ของโปรไฟล์เอนทิตี

หากต้องการเรียกค่าโปรไฟล์เอนทิตีที่ต้องการด้วย XPath คุณจะต้องทราบข้อมูลบางอย่างเกี่ยวกับโครงสร้างของ XML ของโปรไฟล์ หากต้องการดูตัวอย่างโครงสร้าง ให้ใช้การเรียก API การจัดการเพื่อรับ XML สำหรับเอนทิตีที่คุณต้องการ โปรดดูรายละเอียดที่เอกสารอ้างอิง API การจัดการ

ส่วนต่อไปนี้จะมีโค้ดสำหรับการเรียก API พร้อมตัวอย่าง XML จากการเรียก

แอป

$ curl -H "Accept:text/xml" -X GET \
https://api.enterprise.apigee.com/v1/o/{org_name}/apps/{app_id} \
-u email:password

โปรดดูหัวข้อรับแอปในองค์กรด้วยรหัสแอปในข้อมูลอ้างอิงของ Edge Management API

หรือ

$ curl -H "Accept:text/xml" -X GET \
https://api.enterprise.apigee.com/v1/o/{org_name}/developers/{developer_email}/apps/{app_name} \
-u email:password

โปรดดูรับรายละเอียดแอปของนักพัฒนาซอฟต์แวร์ในข้อมูลอ้างอิงของ Edge Management API

ตัวอย่างโปรไฟล์:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<App name="thomas-app">
    <AccessType>read</AccessType>
    <ApiProducts/>
    <Credentials>
        <Credential>
            <Attributes/>
            <ConsumerKey>wrqOOOiPArFI0WRoB1gAJMRbOguekJ5w</ConsumerKey>
            <ConsumerSecret>WvOhDrJ8m6kzz7Ni</ConsumerSecret>
            <ApiProducts>
                <ApiProduct>
                    <Name>FreeProduct</Name>
                    <Status>approved</Status>
                </ApiProduct>
            </ApiProducts>
            <Scopes/>
            <Status>approved</Status>
        </Credential>
    </Credentials>
    <AppFamily>default</AppFamily>
    <AppId>ab308c13-bc99-4c50-8434-0e0ed1b86075</AppId>
    <Attributes>
        <Attribute>
            <Name>DisplayName</Name>
            <Value>Tom's Weather App</Value>
        </Attribute>
    </Attributes>
    <CallbackUrl>http://tom.app/login</CallbackUrl>
    <CreatedAt>1362502872727</CreatedAt>
    <CreatedBy>admin@apigee.com</CreatedBy>
    <DeveloperId>PFK8IwOeAOW01JKA</DeveloperId>
    <LastModifiedAt>1362502872727</LastModifiedAt>
    <LastModifiedBy>admin@apigee.com</LastModifiedBy>
    <Scopes/>
    <Status>approved</Status>
</App>

ผลิตภัณฑ์ API

$ curl  -H "Accept:text/xml" -X GET \
https://api.enterprise.apigee.com/v1/o/{org_name}/apiproducts/{apiproduct_name} \
-u email:password

โปรดดูหัวข้อรับผลิตภัณฑ์ API ในข้อมูลอ้างอิงของ Edge Management API

XPath ตัวอย่าง ดึงทรัพยากร API (URI) ที่สองจากผลิตภัณฑ์ API ชื่อ weather_free:

/ApiProduct['@name=weather_free']/ApiResources/ApiResource[1]/text()

ตัวอย่างโปรไฟล์ที่แสดงผลเป็น XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ApiProduct name="weather_free">
    <ApiResources>
        <ApiResource>/forecastrss, /reports</ApiResource>
    </ApiResources>
    <ApprovalType>auto</ApprovalType>
    <Attributes>
        <Attribute>
            <Name>description</Name>
            <Value>Introductory API Product</Value>
        </Attribute>
        <Attribute>
            <Name>developer.quota.interval</Name>
            <Value>1</Value>
        </Attribute>
        <Attribute>
            <Name>developer.quota.limit</Name>
            <Value>1</Value>
        </Attribute>
        <Attribute>
            <Name>developer.quota.timeunit</Name>
            <Value>minute</Value>
        </Attribute>
        <Attribute>
            <Name>servicePlan</Name>
            <Value>Introductory</Value>
        </Attribute>
    </Attributes>
    <CreatedAt>1355847839224</CreatedAt>
    <CreatedBy>andrew@apigee.com</CreatedBy>
    <Description>Free API Product</Description>
    <DisplayName>Free API Product</DisplayName>
    <Environments/>
    <LastModifiedAt>1355847839224</LastModifiedAt>
    <LastModifiedBy>andrew@apigee.com</LastModifiedBy>
    <Proxies/>
    <Scopes/>
</ApiProduct>

บริษัท

$ curl   -H "Accept:text/xml" -X GET \
https://api.enterprise.apigee.com/v1/o/{org_name}/companies/{company_name} \
-u email:password

โปรดดูรับรายละเอียดบริษัทในข้อมูลอ้างอิงของ Edge Management API

ตัวอย่างโปรไฟล์:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Company name="theramin">
    <Apps/>
    <DisplayName>Theramin Corporation</DisplayName>
    <Organization>apigee-pm</Organization>
    <Status>active</Status>
    <Attributes>
        <Attribute>
            <Name>billing_code</Name>
            <Value>13648765</Value>
        </Attribute>
    </Attributes>
    <CreatedAt>1349208631291</CreatedAt>
    <CreatedBy>andrew@apigee.com</CreatedBy>
    <LastModifiedAt>1349208631291</LastModifiedAt>
    <LastModifiedBy>andrew@apigee.com</LastModifiedBy>
</Company>

นักพัฒนาของบริษัท

$ curl -H "Accept:text/xml" -X GET \
https://api.enterprise.apigee.com/v1/o/{org_name}/companies/{company_name}/developers/{developer_name} \
-u email:password

ตัวอย่างโปรไฟล์:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Developers>
    <Developer>
        <Email>ntesla@theramin.com</Email>
        <Role>developer</Role>
    </Developer>
</Developers>

รหัสผู้ใช้

$ curl -H "Accept:text/xml" -X GET \
https://api.enterprise.apigee.com/v1/o/{org_name}/developers/{developer_email}/apps/{app_name}/keys/{consumer_key} \
-u email:password

โปรดดู รับรายละเอียดคีย์สำหรับแอปนักพัฒนาซอฟต์แวร์ในข้อมูลอ้างอิงของ Edge Management API

XPath ตัวอย่าง:

/Credential/ApiProducts/ApiProduct[Name='weather_free']/Status/text()

ตัวอย่างโปรไฟล์:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Credential>
    <Attributes/>
    <ConsumerKey>XLotL3PRxNkUGXhGAFDPOr6fqtvAhuZe</ConsumerKey>
    <ConsumerSecret>iNUyEaOOh96KR3YL</ConsumerSecret>
    <ApiProducts>
        <ApiProduct>
            <Name>weather_free</Name>
            <Status>approved</Status>
        </ApiProduct>
    </ApiProducts>
    <Scopes/>
    <Status>approved</Status>
</Credential>

นักพัฒนาแอป

$ curl -H "Accept:text/xml" -X GET \
https://api.enterprise.apigee.com/v1/o/{org_name}/developers/{developer_email} \
-u email:password

โปรดดูหัวข้อรับนักพัฒนาซอฟต์แวร์ในข้อมูลอ้างอิงของ Edge Management API

XPath ตัวอย่าง:

/Developer/Attributes/Attribute[Name='my_custom_attribute']/Value/text()
/Developer/Email/text()

ตัวอย่างโปรไฟล์:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Developer>
    <Apps>
        <App>weatherappx</App>
        <App>weatherapp</App>
    </Apps>
    <Email>ntesla@theramin.com</Email>
    <DeveloperId>4Y4xd0KRZ1wmHJqu</DeveloperId>
    <FirstName>Nikola</FirstName>
    <LastName>Tesla</LastName>
    <UserName>theramin</UserName>
    <OrganizationName>apigee-pm</OrganizationName>
    <Status>active</Status>
    <Attributes>
        <Attribute>
            <Name>project_type</Name>
            <Value>public</Value>
        </Attribute>
    </Attributes>
    <CreatedAt>1349797040634</CreatedAt>
    <CreatedBy>rsaha@apigee.com</CreatedBy>
    <LastModifiedAt>1349797040634</LastModifiedAt>
    <LastModifiedBy>rsaha@apigee.com</LastModifiedBy>
</Developer>

ตัวแปรโฟลว์

เมื่อเรียกข้อมูลโปรไฟล์เอนทิตีที่ระบุในนโยบาย AccessEntity แล้ว ระบบจะเพิ่มออบเจ็กต์โปรไฟล์ที่มีรูปแบบ XML เป็นตัวแปรในบริบทข้อความ คุณสามารถเข้าถึงตัวแปรนี้ได้เช่นเดียวกับตัวแปรอื่นๆ โดยมีการอ้างอิงชื่อตัวแปร ชื่อที่ผู้ใช้ระบุของนโยบาย AccessEntity เป็นคำนำหน้าตัวแปรของชื่อตัวแปร

เช่น หากมีการเรียกใช้นโยบาย AccessEntity ที่มีชื่อ GetDeveloper ระบบจะจัดเก็บโปรไฟล์ในรูปแบบ XML ไว้ในตัวแปรชื่อ AccessEntity.GetDeveloper จากนั้นจะแยกวิเคราะห์โปรไฟล์รูปแบบ XML โดยใช้ XPath ที่กำหนดไว้ในนโยบาย ExtractVariant ที่ระบุ AccessEntity.GetDeveloper เป็นแหล่งที่มา

การอ้างอิงข้อผิดพลาด

ดูข้อมูลที่เกี่ยวข้องได้ที่สิ่งที่คุณต้องทราบเกี่ยวกับข้อผิดพลาดของนโยบายและการจัดการข้อผิดพลาด

ข้อผิดพลาดเกี่ยวกับรันไทม์

ไม่มี

ข้อผิดพลาดในการทำให้ใช้งานได้

ชื่อข้อผิดพลาด สตริงข้อผิดพลาด สถานะ HTTP เกิดขึ้นเมื่อ
InvalidEntityType Invalid type [entity_type] in ACCESSENTITYStepDefinition [policy_name] ไม่มีข้อมูล ประเภทเอนทิตีที่ใช้ต้องเป็นประเภทที่รองรับ

หัวข้อที่เกี่ยวข้อง