Class IdentityAttributeConstraint

  • All Implemented Interfaces:
    ExtendedPasswordConstraint, sailpoint.api.passwordConstraints.PasswordConstraint

    public class IdentityAttributeConstraint
    extends sailpoint.api.passwordConstraints.PasswordConstraintAttribute
    implements ExtendedPasswordConstraint
    Extends the OOTB PasswordConstraintAttribute to create a constraint for a single identity attribute.

    (The existing one is far too broad and will include attributes we really don’t care about, like flags with value of “true” and such.)

    • Field Summary

      • Fields inherited from class sailpoint.api.passwordConstraints.PasswordConstraintAttribute

        ATTR_MIN_LENGTH
    • Constructor Summary

      Constructors 
      Constructor Description
      IdentityAttributeConstraint​(sailpoint.object.Identity target, String attributeName)
      Constructs a new IdentityAttributeConstraint for the given identity and attribute name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getDescription()
      Returns a description of the password constraint, used by the UI to display the constraint to the user.
      void setAdmin​(boolean isAdmin)
      Sets the admin flag for this constraint.
      • Methods inherited from class sailpoint.api.passwordConstraints.PasswordConstraintAttribute

        validate
      • Methods inherited from class sailpoint.api.passwordConstraints.AbstractPasswordConstraint

        generate, getRandom, getRandomFromSet, initRandom
      • Methods inherited from interface sailpoint.api.passwordConstraints.PasswordConstraint

        generate, validate
    • Constructor Detail

      • IdentityAttributeConstraint

        public IdentityAttributeConstraint​(sailpoint.object.Identity target,
                                           String attributeName)
        Constructs a new IdentityAttributeConstraint for the given identity and attribute name.
        Parameters:
        target - The identity to check against
        attributeName - The name of the attribute to check against
    • Method Detail

      • setAdmin

        public void setAdmin​(boolean isAdmin)
        Sets the admin flag for this constraint.

        In our case, this is a no-op, because we want this constraint to still apply when an admin is changing the password.

        Specified by:
        setAdmin in interface ExtendedPasswordConstraint
        Parameters:
        isAdmin - true if the current check is being done by an admin, false otherwise.