Displaying a simple error page from a flow

Wessel, Keith kwessel at illinois.edu
Fri Dec 9 15:22:30 EST 2016


Thank you very much, Scott. That makes perfect sense.

So, I've got my map, and I'm passing it in as a reference, and the attribute resolver is working as it should with my reference to custom["attributeResolver"}. I'm still having problems with setting the principal. I've got a bean like you suggested in my file:
<bean id="UsernameLookupStrategy" class="net.shibboleth.idp.session.context.navigate.CanonicalUsernameLookupStrategy">

I'm then including that bean by reference in my map with a key called usernameLookup. I replaced the setPrincipal call in my checkSecondFactor script like this:

resCtx.setPrincipal(custom["usernameLookup"]);

It seems that this is executing without errors, but it's not returning a principal to then do attribute resolution on. I tried making it custom["usernameLookup"].getPrincipalName(), but I assumed that wasn't right in the first place as your code is returning the principalname already. And sure enough, the log says no such function.

Before I throw in more debugging, can you tell me what I should be passing to the resCtx.setPrincipal method, please?

Thanks,
Keith




-----Original Message-----
From: users [mailto:users-bounces at shibboleth.net] On Behalf Of Cantor, Scott
Sent: Friday, December 09, 2016 12:25 PM
To: Shib Users <users at shibboleth.net>
Subject: Re: Displaying a simple error page from a flow

On 12/9/16, 1:14 PM, "users on behalf of Wessel, Keith" <users-bounces at shibboleth.net on behalf of kwessel at illinois.edu> wrote:

>    I think I get it, but I'm still not great with Spring. The util:map should look like this?

Yes, basically.

> Is custom now a hash of beans that can be referenced with something like custom["attributeResolver"]?

Yes, it's just a Java map, and supports all the methods on Map. Javascript supports indexing a map with brackets, so that's a shorthand, it's the same as custom.get("key");

You don't have to use strings, BTW, you can index a Java Map with any Object, strings are just obvious.

You don't have to use a map either, could be a list, whatever. Anything that tunnels multiple objects in through one object.

-- Scott


-- 
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net


More information about the users mailing list