Creation of DataConnector
Giuseppe Peletti
giuseppe.peletti at digitaslbi.com
Wed Oct 19 11:04:27 EDT 2016
Hi Rod,
thanks for the answer.
I already read the document but it¹s not that clear (to me).
This is my attribute-resolver.xml
<resolver:AttributeDefinition xsi:type="ad:Simple" id="accessToken"
xmlns="urn:mace:shibboleth:2.0:resolver:ad"
sourceAttributeID="accessToken">
<resolver:Dependency ref=³myDataConnector" />
<resolver:AttributeEncoder xsi:type="SAML1String"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
name="accessTokenElement" />
<resolver:AttributeEncoder xsi:type="SAML2String"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
name="accessTokenElement" />
</resolver:AttributeDefinition>
This is myDataConnector.xml, pointed by services.xml
<bean id="pirelliDataConnector" class="com.me.MyDataConnector">
<property name="values">
<list>
<bean class="net.shibboleth.idp.attribute.IdPAttribute"
c:attributeId="accessToken"></bean>
</list>
</property>
</bean>
This is MyDataConnector
public class MyDataConnector extends AbstractDataConnector {
@Override
@Nullable protected Map<String, IdPAttribute>
doDataConnectorResolve(AttributeResolutionContext context,
AttributeResolverWorkContext arg1) throws ResolutionException {
Map<String, IdPAttribute> attributes = new HashMap<String,
IdPAttribute>();
IdPAttribute attribute = new IdPAttribute("test value from class");
attributes.put("testValue1", attribute);
return attributes;
}
}
Thanks again
On 19/10/16 16:46, "dev on behalf of Rod Widdowson"
<dev-bounces at shibboleth.net on behalf of rdw at steadingsoftware.com> wrote:
>Guiseppe,
>
>> So far I created a class that extends StaticDataConnector and mapped it
>>in a spring file pointed by services.xml, but I¹m having
>troubles
>> on mapping the input values.
>
>I missed this over in user list (or rather I misread it).
>
>I suggest you start by reading this [1] . It's slightly long in the
>tooth but still generally accurate and helpful. Don't hesitate
>to come back with followup questions.
>
>Rod
>
>
>
>[1]
>https://wiki.shibboleth.net/confluence/display/IDP30/Developing+Attribute+
>Resolver+Extensions
>
>--
>To unsubscribe from this list send an email to
>dev-unsubscribe at shibboleth.net
------------------------------------------------------------------------
Disclaimer The information in this email and any attachments may contain proprietary and confidential information that is intended for the addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, retention or use of the contents of this information is prohibited. When addressed to our clients or vendors, any information contained in this e-mail or any attachments is subject to the terms and conditions in any governing contract. If you have received this e-mail in error, please immediately contact the sender and delete the e-mail.
More information about the dev
mailing list