Package netscape.ldap.controls
Class LDAPPasswordExpiringControl
java.lang.Object
netscape.ldap.LDAPControl
netscape.ldap.controls.LDAPStringControl
netscape.ldap.controls.LDAPPasswordExpiringControl
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
LdapPasswordExpiringControl
Represents an LDAP v3 server control that may be returned if a
password is about to expire, and password policy is enabled on the server.
The OID for this control is 2.16.840.1.113730.3.4.5.
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsFields inherited from class netscape.ldap.controls.LDAPStringControl
m_msgFields inherited from class netscape.ldap.LDAPControl
m_critical, m_value, MANAGEDSAIT, PWEXPIRED, PWEXPIRING -
Constructor Summary
ConstructorsConstructorDescriptionLDAPPasswordExpiringControl(String oid, boolean critical, byte[] value) Contructs anLDAPPasswordExpiringControlobject. -
Method Summary
Modifier and TypeMethodDescriptionGets the value associated with this control parsed as a string.intGets the number of seconds until the password expires returned by the server.static StringparseResponse(LDAPControl[] controls) Deprecated.LDAPPasswordExpiringControl controls are now automatically instantiated.toString()Return a string representation of the control for debuggingMethods inherited from class netscape.ldap.controls.LDAPStringControl
parseResponseMethods inherited from class netscape.ldap.LDAPControl
clone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, register
-
Field Details
-
EXPIRING
- See Also:
-
-
Constructor Details
-
LDAPPasswordExpiringControl
Contructs anLDAPPasswordExpiringControlobject. This constructor is used byLDAPControl.registerto instantiate password expiring controls.To retrieve the number of seconds until this password expires, call
getSecondsToExpiration.- Parameters:
oid- this parameter must beLDAPPasswordExpiringControl.EXPIRINGor anLDAPExceptionis throwncritical-trueif this control is criticalvalue- the value associated with this control- Throws:
LDAPException- If oid is notLDAPPasswordExpiringControl.EXPIRING.- See Also:
-
-
Method Details
-
getSecondsToExpiration
public int getSecondsToExpiration()Gets the number of seconds until the password expires returned by the server.- Returns:
- int the number of seconds until the password expires.
- Throws:
NumberFormatException- If the server returned an undecipherable message. In this case, usegetMessageto retrieve the message as a string.
-
getMessage
Gets the value associated with this control parsed as a string.- Returns:
- the value associated with this control parsed as a string.
-
parseResponse
Deprecated.LDAPPasswordExpiringControl controls are now automatically instantiated.- Parameters:
controls- an array ofLDAPControlobjects, representing the controls returned by the server. after a search. To get these controls, use thegetResponseControlsmethod of theLDAPConnectionclass.- Returns:
- an error message string, or null if none is in the control.
- See Also:
-
toString
Description copied from class:LDAPControlReturn a string representation of the control for debugging- Overrides:
toStringin classLDAPControl- Returns:
- a string representation of the control.
-