...
Code Block |
---|
public class MyDataConnector extends BaseDataConnector { private String lookupUrl; //This is an example custom field, yours may vary (if any) public MyDataConnector(String url) { this.lookupUrl = url; } public Map<String, BaseAttribute> resolve(ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException { Map<String, BaseAttribute> result = new HashMap<String, BaseAttribute>(); String username = resolutionContext.getAttributeRequestContext().getPrincipalName(); // add BasicAttributes to the result here. return result; } } |
Note that your extension class must return a non-null result, even if there are no attributes to return.
Extension Schema
Located in your JAR file as schema/myConnector.xsd.
...