netscape.ldap.controls
Class LDAPPasswordExpiringControl
- Cloneable, java.io.Serializable
public class LDAPPasswordExpiringControl
extends netscape.ldap.controls.LDAPStringControl
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.
String | getMessage() - Gets the value associated with this control parsed as a string.
|
int | getSecondsToExpiration() - Gets the number of seconds until the password expires returned by the
server.
|
static String | parseResponse(LDAPControl[] controls) - LDAPPasswordExpiringControl controls are now automatically
instantiated.
|
String | toString()
|
EXPIRING
public static final String EXPIRING
LDAPPasswordExpiringControl
public LDAPPasswordExpiringControl(String oid,
boolean critical,
byte[] value)
throws LDAPException
Contructs an
LDAPPasswordExpiringControl
object.
This constructor is used by
LDAPControl.register
to
instantiate password expiring controls.
To retrieve the number of seconds until this password expires,
call
getSecondsToExpiration
.
oid
- this parameter must be
LDAPPasswordExpiringControl.EXPIRING
or an LDAPException
is throwncritical
- true
if this control is criticalvalue
- the value associated with this control
LDAPException
- If oid is not
LDAPPasswordExpiringControl.EXPIRING.
getMessage
public String getMessage()
Gets the value associated with this control parsed as a string.
- the value associated with this control parsed as a string.
getSecondsToExpiration
public int getSecondsToExpiration()
Gets the number of seconds until the password expires returned by the
server.
- int the number of seconds until the password expires.
parseResponse
public static String parseResponse(LDAPControl[] controls)
LDAPPasswordExpiringControl controls are now automatically
instantiated.
controls
- an array of LDAPControl
objects,
representing the controls returned by the server.
after a search. To get these controls, use the
getResponseControls
method of the
LDAPConnection
class.
- an error message string, or null if none is in the control.