Class PrincipalTokenRestriction

  • All Implemented Interfaces:
    TokenRestriction, Serializable

    public class PrincipalTokenRestriction
    extends Object
    implements TokenRestriction
    This Class represents a PrincipalTokenRestriction implementing the TokenRestriction interface provides methods to check and compare SSOToken restrictions for this DN
    See Also:
    Serialized Form
    • Constructor Detail

      • PrincipalTokenRestriction

        public PrincipalTokenRestriction​(String dn)
        Creates PrincipalTokenRestriction object for the specified dn
        Parameters:
        dn - the name of the DN.
    • Method Detail

      • hashCode

        public int hashCode()
        Returns a hash code for this object.
        Specified by:
        hashCode in interface TokenRestriction
        Overrides:
        hashCode in class Object
        Returns:
        a hash code value for this object.
      • equals

        public boolean equals​(Object other)
        Compares this DN to the specified object. The result is true if and only if the argument is not null, and other is the same as this restriction.
        Specified by:
        equals in interface TokenRestriction
        Overrides:
        equals in class Object
        Parameters:
        other - - the object to compare this restriction against.
        Returns:
        true if the restriction object compared as string are equal; false otherwise.
      • isSatisfied

        public boolean isSatisfied​(Object context)
                            throws Exception
        Returns a true if the restriction matches the context for which it was set, otherwise it returns false.
        Specified by:
        isSatisfied in interface TokenRestriction
        Parameters:
        context - The context from which the restriction needs to be checked The context can be: - the SSOToken of the Application against which the restriction is being compared
        Returns:
        boolean True if the restriction is satisfied, false otherwise
        Throws:
        Exception - if the there was an error.