Class PasswordExpiringControl


  • public class PasswordExpiringControl
    extends Control
    This class implements the Netscape password expiring control, which serves as a warning to clients that the user's password is about to expire. The only element contained in the control value is a string representation of the number of seconds until expiration.
    • Constructor Detail

      • PasswordExpiringControl

        public PasswordExpiringControl​(int secondsUntilExpiration)
        Creates a new instance of the password expiring control with the provided information.
        Parameters:
        secondsUntilExpiration - The length of time in seconds until the password actually expires.
      • PasswordExpiringControl

        public PasswordExpiringControl​(boolean isCritical,
                                       int secondsUntilExpiration)
        Creates a new instance of the password expiring control with the provided information.
        Parameters:
        isCritical - Indicates whether support for this control should be considered a critical part of the client processing.
        secondsUntilExpiration - The length of time in seconds until the password actually expires.
    • Method Detail

      • writeValue

        public void writeValue​(ASN1Writer writer)
                        throws IOException
        Description copied from class: Control
        Writes this control's value to an ASN.1 writer. The value (if any) must be written as an ASN1OctetString.
        Specified by:
        writeValue in class Control
        Parameters:
        writer - The ASN.1 writer to use.
        Throws:
        IOException - If a problem occurs while writing to the stream.
      • getSecondsUntilExpiration

        public int getSecondsUntilExpiration()
        Retrieves the length of time in seconds until the password actually expires.
        Returns:
        The length of time in seconds until the password actually expires.
      • toString

        public void toString​(StringBuilder buffer)
        Appends a string representation of this password expiring control to the provided buffer.
        Overrides:
        toString in class Control
        Parameters:
        buffer - The buffer to which the information should be appended.