Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
titleJava 7 の場合Shibboleth IdP V4以降向け

    <AttributeDefinition id="eduPersonTargetedIDLogging" xsi:type="ScriptedAttribute">
        <!-- Inputs that provides the source attribute. -->
        <InputDataConnector ref="computedID" attributeNames="computedID" />
        <InputAttributeDefinition ref="eduPersonPrincipalName" />

        <Script><![CDATA[
            logger = Java.type("org.slf4j.LoggerFactory").getLogger("net.shibboleth.idp.attribute");

            if ( resolutionContext.attributeRecipientID.equals("https://shiken-sp00.nii.ac.jp/shibboleth-sp") )
{
                logger.info(
                    "eduPersonPrincipalName : " + eduPersonPrincipalName.getValues().get(0).getValue()
                        + '@' + eduPersonPrincipalName.getValues().get(0).getScope()
                    + " , eduPersonTargetedID : " + computedID.getValues().get(0)
                    );
            }

        ]]></Script>
    </AttributeDefinition>

Panel
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
titleShibboleth IdP 3.xでJava 8 以降の場合

<resolver:AttributeDefinition id="eduPersonTargetedIDLogging" xsi:type="Script" xmlns="urn:mace:shibboleth:2.0:resolver:ad">

  <!-- Dependency that provides the source attribute. -->
  <resolver:Dependency ref="computedID" />
  <resolver:Dependency ref="eduPersonPrincipalName" />

  <Script><![CDATA[
       importPackage(Packages.       logger = Java.type("org.slf4j);
       logger = LoggerFactory.LoggerFactory").getLogger("net.shibboleth.idp.attribute");

            if (  resolutionContext.attributeRecipientID.equals("https://shiken-sp00.nii.ac.jp/shibboleth-sp") ) {
           logger.info(
                   "eduPersonPrincipalName : " + eduPersonPrincipalName.getValues().get(0).getValue()
                           + '@' + eduPersonPrincipalName.getValues().get(0).getScope()
                   + " , eduPersonTargetedID : " + computedID.getValues().get(0)
                  );
       }
  ]]></Script>
</resolver:AttributeDefinition>

 

Panel
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
titleJava 8 以降の場合Shibboleth IdP 3.xでJava 7 の場合

<resolver:AttributeDefinition id="eduPersonTargetedIDLogging" xsi:type="Script" xmlns="urn:mace:shibboleth:2.0:resolver:ad">


  <!-- Dependency that provides the source attribute. -->
  <resolver:Dependency ref="computedID" />
  <resolver:Dependency ref="eduPersonPrincipalName" />

  <Script><![CDATA[
       importPackage(Packages.org.slf4j);

       logger = Java.type("org.slf4j. LoggerFactory").getLogger("net.shibboleth.idp.attribute");

            if (  resolutionContext.attributeRecipientID.equals("https://shiken-sp00.nii.ac.jp/shibboleth-sp") ) {
           logger.info(
                   "eduPersonPrincipalName : " + eduPersonPrincipalName.getValues().get(0).getValue()
                           + '@' + eduPersonPrincipalName.getValues().get(0).getScope()
                   + " , eduPersonTargetedID : " + computedID.getValues().get(0)
                  );
       }
  ]]></Script>
</resolver:AttributeDefinition>

...