Class MetadataPolicy


  • public class MetadataPolicy
    extends Object
    The metadata policy for a single claim. It exploits the operators defined in the 5.1 of OIDC federation spec (draft 17 for time being): https://openid.net/specs/openid-connect-federation-1_0.html#rfc.section.5.1
    • Field Detail

      • forcedValue

        private Object forcedValue
        The (forced) value for the claim.
      • add

        private Object add
        The value(s) to be added for the claim.
      • defaultValue

        private Object defaultValue
        The default value for the claim to be used in case none is specified.
      • oneOfValues

        private List<Object> oneOfValues
        The list of values from which the claim must be one of.
      • subsetOfValues

        private List<Object> subsetOfValues
        The list of value(s) from which the claim must be subset of.
      • supersetOfValues

        private List<Object> supersetOfValues
        The list of value(s) from which the claim must be superset of.
      • essential

        private Boolean essential
        The flag indicating that the claim must have a value.
      • regexp

        private String regexp
        The regular expression that the claim value must meet.
    • Constructor Detail

      • MetadataPolicy

        public MetadataPolicy()
    • Method Detail

      • getValue

        public Object getValue()
        Get the (forced) value for the claim.
        Returns:
        The (forced) value for the claim.
      • setValue

        public void setValue​(Object value)
        Set the (forced) value for the claim.
        Parameters:
        value - What to set.
      • getAdd

        public Object getAdd()
        Get the value(s) to be added for the claim.
        Returns:
        The value(s) to be added for the claim.
      • setAdd

        public void setAdd​(Object value)
        Set the value(s) to be added for the claim.
        Parameters:
        value - What to set.
      • getDefaultValue

        public Object getDefaultValue()
        Get the default value for the claim to be used in case none is specified.
        Returns:
        The default value for the claim to be used in case none is specified.
      • setDefaultValue

        public void setDefaultValue​(Object value)
        Set the default value for the claim to be used in case none is specified.
        Parameters:
        value - What to set.
      • getOneOfValues

        public List<Object> getOneOfValues()
        Get the list of values from which the claim must be one of.
        Returns:
        The list of values from which the claim must be one of.
      • setOneOfValues

        public void setOneOfValues​(List<Object> values)
        Set the list of values from which the claim must be one of.
        Parameters:
        values - What to set.
      • getSubsetOfValues

        public List<Object> getSubsetOfValues()
        Get the list of value(s) from which the claim must be subset of.
        Returns:
        The list of value(s) from which the claim must be subset of.
      • setSubsetOfValues

        public void setSubsetOfValues​(List<Object> values)
        Set the list of value(s) from which the claim must be subset of.
        Parameters:
        values - What to set.
      • getSupersetOfValues

        public List<Object> getSupersetOfValues()
        Get the list of value(s) from which the claim must be superset of.
        Returns:
        The list of value(s) from which the claim must be superset of.
      • setSupersetOfValues

        public void setSupersetOfValues​(List<Object> values)
        Set the list of value(s) from which the claim must be superset of.
        Parameters:
        values - What to set.
      • getEssential

        public Boolean getEssential()
        Get the flag indicating that the claim must have a value.
        Returns:
        The flag indicating that the claim must have a value.
      • isEssential

        public boolean isEssential()
        Is the flag indicating that the claim must have a value enabled.
        Returns:
        true if enabled, false otherwise.
      • setEssential

        public void setEssential​(Boolean isEssential)
        Set the flag indicating that the claim must have a value.
        Parameters:
        isEssential - What to set.
      • getRegexp

        public String getRegexp()
        Get the regular expression that the claim value must meet.
        Returns:
        The regular expression that the claim value must meet.
      • setRegexp

        public void setRegexp​(String value)
        Set the regular expression that the claim value must meet.
        Parameters:
        value - What to set.