Locate an Attribute Resolver

Samuel Bristot Loli bristot at gmail.com
Sun Oct 1 18:31:39 EDT 2017


Hello All,

Sorry for the doubts, I'm starting in the shib world.

I developed a new authentication flow that is being called as the second
factor through mfa-config-flow. I need to get the user attributes from the
response of the first authentication factor "Password" to use in my
authentication flow. Reading the documentation, I came up with this code:

Ps.: My question is in the code comment.

public String TestLoginService(AuthenticationContext authenticationContext,
ProfileRequestContext<?, ?> profileRequestContext) {
        SubjectCanonicalizationContext sub = (SubjectCanonicalizationContext)
profileRequestContext.getSubcontext("net.shibboleth.idp.authn.context.
SubjectCanonicalizationContext");
        AttributeResolutionContext att = (AttributeResolutionContext)
authenticationContext.getSubcontext("net.shibboleth.idp.attribute.resolver.
context.AttributeResolutionContext", true);
        att.setPrincipal(sub.getPrincipalName());
        att.getRequestedIdPAttributeNames().add("mail");
        att.getRequestedIdPAttributeNames().add("eduPersonPrincipalName");
        att.getRequestedIdPAttributeNames().add("uid");
        att.resolveAttributes(?)
        //I don't now how to get an AttributeResolver objects to call the
method att.resolveAttributes, which expects an AttributeResolver as
parameter.
        IdPAttribute emailAttr = att.getResolvedIdPAttributes().get("mail");
        IdPAttribute uid = att.getResolvedIdPAttributes().get("uid");
        IdPAttribute eppn = att.getResolvedIdPAttributes()
.get("eduPersonPrincipalName");
    }

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20171001/60b961a1/attachment.html>


More information about the users mailing list