All work

 
21 of 21

Implement regex-enabled attribute matching predicate

Fixed

Description

Implement an attribute predicate that works like SimpleAttributePredicate, but takes a regex instead of a list of fixed strings to match against.

Environment

None

Attachments

2

Details

Assignee

Reporter

Fix versions

Created October 10, 2016 at 7:16 PM
Updated November 11, 2016 at 12:29 AM
Resolved October 11, 2016 at 1:24 AM

Activity

Christopher Bongaarts 
October 12, 2016 at 4:09 PM

This code file is submitted under the terms of the attached Apache License 2.0.

Scott Cantor 
October 11, 2016 at 1:24 AM

r8485

Christopher Bongaarts 
October 10, 2016 at 7:25 PM

Example usage:

<bean id="isPasswordExpired" class="edu.umn.oit.idm.shib.RegexAttributePredicate" p:pat="^[Xs].*" p:attributeId="umnPasswordStatus" p:attributeContextLookupStrategy-ref="shibboleth.ChildLookupOrCreate.AttributeContext"/>

Calling isPasswordExpired.apply(pRC) will return true if and only if the attribute "umnPasswordStatus" matches the pattern in pat (i.e. starts with an "X" or an "s").