2016-11-03 6 views
0
<saml:Attribute 
xmlns:x500="urn:oasis:names:tc:SAML:2.0:profiles:attribute:X500" 
x500:Encoding="LDAP" 
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" 
Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.1" 
FriendlyName="eduPersonAffiliation"> 
    <saml:AttributeValue 
    xsi:type="xs:string">member</saml:AttributeValue> 
    <saml:AttributeValue 
    xsi:type="xs:string">staff</saml:AttributeValue> 
</saml:Attribute> 

私のPHPコードでSAMLから2番目の値(スタッフ)を取得したい場合、コードは上に示したようにexacltyに見えます。これにはどのように到達できますか?2番目のAttributeValueをSAMLから取得する

答えて

0

を使用できSimpleSAMLphp's API

$as = new SimpleSAML_Auth_Simple('default-sp'); 
$as->requireAuth(); 
$attributes = $as->getAttributes(); 
// The attribute Name is the key 
$secondValue = $attributes['urn:oid:1.3.6.1.4.1.5923.1.1.1.1'][1]; 
関連する問題