Class PasswordPolicyResponseControl
java.lang.Object
org.springframework.security.ldap.ppolicy.PasswordPolicyControl
org.springframework.security.ldap.ppolicy.PasswordPolicyResponseControl
- All Implemented Interfaces:
- Serializable,- Control
Represents the response control received when a PasswordPolicyControl is used
 when binding to a directory. Currently tested with the OpenLDAP 2.3.19 implementation
 of the LDAP Password Policy Draft. It extends the request control with the control
 specific data. This is accomplished by the properties timeBeforeExpiration,
 graceLoginsRemaining.
 
- 
Field SummaryFields inherited from class org.springframework.security.ldap.ppolicy.PasswordPolicyControlOIDFields inherited from interface javax.naming.ldap.ControlCRITICAL, NONCRITICAL
- 
Constructor SummaryConstructorsConstructorDescriptionPasswordPolicyResponseControl(byte[] encodedValue) Decodes the Ber encoded control data.
- 
Method SummaryModifier and TypeMethodDescriptionbyte[]Returns the unchanged value of the response control.intReturns the graceLoginsRemaining.intReturns the timeBeforeExpiration.booleanhasError()Checks whether an error is present.booleanChecks whether a warning is present.booleanbooleanbooleanisLocked()Determines whether an account locked error has been returned.booleantoString()Create a textual representation containing error and warning messages, if any are present.Methods inherited from class org.springframework.security.ldap.ppolicy.PasswordPolicyControlgetID, isCritical
- 
Constructor Details- 
PasswordPolicyResponseControlpublic PasswordPolicyResponseControl(byte[] encodedValue) Decodes the Ber encoded control data. The ASN.1 value of the control data is:PasswordPolicyResponseValue ::= SEQUENCE { warning [0] CHOICE { timeBeforeExpiration [0] INTEGER (0 .. maxInt), graceAuthNsRemaining [1] INTEGER (0 .. maxInt) } OPTIONAL, error [1] ENUMERATED { passwordExpired (0), accountLocked (1), changeAfterReset (2), passwordModNotAllowed (3), mustSupplyOldPassword (4), insufficientPasswordQuality (5), passwordTooShort (6), passwordTooYoung (7), passwordInHistory (8) } OPTIONAL }
 
- 
- 
Method Details- 
getEncodedValuepublic byte[] getEncodedValue()Returns the unchanged value of the response control. Returns the unchanged value of the response control as byte array.- Specified by:
- getEncodedValuein interface- Control
- Overrides:
- getEncodedValuein class- PasswordPolicyControl
- Returns:
- always null
 
- 
getErrorStatus
- 
getGraceLoginsRemainingpublic int getGraceLoginsRemaining()Returns the graceLoginsRemaining.- Returns:
- Returns the graceLoginsRemaining.
 
- 
getTimeBeforeExpirationpublic int getTimeBeforeExpiration()Returns the timeBeforeExpiration.- Returns:
- Returns the time before expiration in seconds
 
- 
hasErrorpublic boolean hasError()Checks whether an error is present.- Returns:
- true, if an error is present
 
- 
hasWarningpublic boolean hasWarning()Checks whether a warning is present.- Returns:
- true, if a warning is present
 
- 
isExpiredpublic boolean isExpired()
- 
isChangeAfterResetpublic boolean isChangeAfterReset()
- 
isUsingGraceLoginspublic boolean isUsingGraceLogins()
- 
isLockedpublic boolean isLocked()Determines whether an account locked error has been returned.- Returns:
- true if the account is locked.
 
- 
toStringCreate a textual representation containing error and warning messages, if any are present.
 
-