Handling New User Memberships

Cantor, Scott cantor.2 at osu.edu
Wed May 10 09:36:23 EDT 2017

On 5/10/17, 8:39 AM, "users on behalf of Brandon McKean" <users-bounces at shibboleth.net on behalf of mckeanbs at jmu.edu> wrote:

> I was aiming for more of a regex style of match.

Then you can wire up a regex directly with the RegexAttributePredicate class in the same Java package. Or you can punt and just use a ScriptedPredicate too.

> I was able to get the 
> SimpleAttributePredicate working with an attribute that only produces 
> one value, so what I've done now is invent a new scripted attribute that 
> produces a one value result to then be used by ContextCheckPredicate.

Same thing, you're just moving the script into the resolver. You don't have to use SimpleAttributePredicate. It's an example, nothing more.

> Is this a good way to handle what I'm trying to do? It does work either 
> way but if there's a recommended approach I'd rather do that.

There are no recommended approaches. The flow just evaluates a Predicate<ProfileRequestContext>. It doesn't care what you install as the Predicate.

-- Scott

More information about the users mailing list