Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
de:shibidp3extdataconnector [2015/09/08 11:10]
Petra Berg Schema eingefügt
de:shibidp3extdataconnector [2015/09/08 13:51] (aktuell)
Petra Berg Anwendung DataConnector
Zeile 59: Zeile 59:
             throw new ResolutionException("​Digest algorithm was not supported, unable to compute ID", e);             throw new ResolutionException("​Digest algorithm was not supported, unable to compute ID", e);
         }         }
 +   }
 +}
 +</​file>​
 +
 +===Data Connector Parser===
 +
 +<file java TargetedIdSampleDataConnectorParser.java>​
 +package org.example.shib_idp;​
 +...
 +public class TargetedIdSampleDataConnectorParser extends AbstractDataConnectorParser {
 +
 +   ​public static final QName SCHEMA_NAME = new QName(TargetedIdSampleDataConnectorNamespaceHandler.NAMESPACE,​ "​TargetedIdDataConnector"​);​
 +
 +     /** {@inheritDoc} */
 +    @Override protected Class<​TargetedIdSampleDataConnector>​ getNativeBeanClass() {
 +        return TargetedIdSampleDataConnector.class;​
 +    }
 +
 +   ​@Override
 +   ​protected void doV2Parse(Element element, ParserContext parserContext,​
 +         ​BeanDefinitionBuilder builder) {
 +      super.doParse(element,​ builder); ​     ​
 +   }
 +}
 +</​file>​
 +
 +===Data Connector Namespace Handler===
 +
 +<file java TargetedIdSampleDataConnectorNamespaceHandler.java>​
 +package org.example.shib_idp;​
 +
 +import net.shibboleth.ext.spring.util.BaseSpringNamespaceHandler;​
 +
 +public class TargetedIdSampleDataConnectorNamespaceHandler extends BaseSpringNamespaceHandler {
 +
 +    /** Namespace for this handler. */
 +    public static String NAMESPACE = "​urn:​example.org:​shibboleth:​2.0:​resolver";​
 +    ​
 +    /** {@inheritDoc} */
 +   ​@Override
 +   ​public void init() {
 +        registerBeanDefinitionParser(TargetedIdSampleDataConnectorParser.SCHEMA_NAME,​
 +                new TargetedIdSampleDataConnectorParser());​
    }    }
 } }
Zeile 91: Zeile 134:
 </​file>​ </​file>​
  
 +===Spring Schema File===
 +
 +   * Das Schema File muss im *.jar File unter META-INF/​spring.schemas liegen
 +
 +<file properties META-INF/​spring.schemas>​
 +urn\:​example.org\:​shibboleth\:​2.0\:​resolver = schema/​myConnectors.xsd
 +</​file>​
 +
 +===Spring Handler File===
 +
 +   * Das Handler File muss im *.jar File unter META-INF/​spring.handlers liegen
 +
 +<file properties META-INF/​spring.handlers>​
 +urn\:​example.org\:​shibboleth\:​2.0\:​resolver = org.example.shib_idp.TargetedIdSampleDataConnectorNamespaceHandler
 +</​file>​
 +
 +===Plug-In installieren===
 +
 +   * Aus den angegebenen Dateien ein *.jar file generieren (am besten mit mvn)
 +   * Dieses *.jar file in das lib Verzeichnis der Webapplication vom Shibboleth IdP kopieren.
 +
 +===Data Connector im Attribute Resolver benutzen===
 +
 +<file xml conf/​attribute-resolver.xml>​
 + <​resolver:​AttributeResolver
 +          xmlns:​resolver="​urn:​mace:​shibboleth:​2.0:​resolver" ​
 +          xmlns:​pc="​urn:​mace:​shibboleth:​2.0:​resolver:​pc"​
 +          xmlns:​ad="​urn:​mace:​shibboleth:​2.0:​resolver:​ad" ​
 +          xmlns:​dc="​urn:​mace:​shibboleth:​2.0:​resolver:​dc"​
 +          xmlns:​enc="​urn:​mace:​shibboleth:​2.0:​attribute:​encoder" ​
 +          xmlns:​sec="​urn:​mace:​shibboleth:​2.0:​security"​
 +          xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance" ​
 +          xmlns:​tid="​urn:​example.org:​shibboleth:​2.0:​resolver"​
 +          xsi:​schemaLocation="​urn:​mace:​shibboleth:​2.0:​resolver http://​shibboleth.net/​schema/​idp/​shibboleth-attribute-resolver.xsd
 +                              urn:​mace:​shibboleth:​2.0:​resolver:​pc http://​shibboleth.net/​schema/​idp/​shibboleth-attribute-resolver-pc.xsd
 +                              urn:​mace:​shibboleth:​2.0:​resolver:​ad http://​shibboleth.net/​schema/​idp/​shibboleth-attribute-resolver-ad.xsd
 +                              urn:​mace:​shibboleth:​2.0:​resolver:​dc http://​shibboleth.net/​schema/​idp/​shibboleth-attribute-resolver-dc.xsd
 +                              urn:​mace:​shibboleth:​2.0:​attribute:​encoder http://​shibboleth.net/​schema/​idp/​shibboleth-attribute-encoder.xsd
 +                              urn:​example.org:​shibboleth:​2.0:​resolver classpath:/​schema/​myConnectors.xsd
 +                              urn:​mace:​shibboleth:​2.0:​security http://​shibboleth.net/​schema/​idp/​shibboleth-security.xsd">​
 +...
 +<!-- TargetedId DataConnector -->
 +     <​resolver:​DataConnector id="​myData"​ xsi:​type="​TargetedIdDataConnector"​ xmlns="​urn:​example.org:​shibboleth:​2.0:​resolver">​
 +     </​resolver:​DataConnector>​
 +</​file>​
  
  • Zuletzt geändert: vor 4 Jahren