Class RegisteredServiceRegexAttributeFilter

  • All Implemented Interfaces:
    java.io.Serializable, org.apereo.cas.services.RegisteredServiceAttributeFilter, org.springframework.core.Ordered

    public class RegisteredServiceRegexAttributeFilter
    extends java.lang.Object
    implements org.apereo.cas.services.RegisteredServiceAttributeFilter
    The regex filter that is responsible to make sure only attributes that match a certain regex pattern registered service are released.
    Since:
    4.0.0
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> filter​(java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> givenAttributes)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apereo.cas.services.RegisteredServiceAttributeFilter

        getOrder
    • Constructor Detail

      • RegisteredServiceRegexAttributeFilter

        public RegisteredServiceRegexAttributeFilter​(java.lang.String regex)
        Instantiates a new registered service regex attribute filter.
        Parameters:
        regex - the regex
    • Method Detail

      • filter

        public java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> filter​(java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> givenAttributes)

        Given attribute values may be an extension of Collection, Map or an array.

        • The filtering operation is non-recursive.
        • Multi-valued attributes such as those of type Collection and Map are expected to allow casting to Map<String, String> or Collection<String>. Values that are of type array are expected to allow casting to String[].
        • Multi-valued attributes are always put back into the final released collection of attributes as String[].
        • If the final filtered collection is empty, it will not be put into the collection of attributes.
        Specified by:
        filter in interface org.apereo.cas.services.RegisteredServiceAttributeFilter