mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-25 21:42:17 +00:00
Tidying up.
This commit is contained in:
parent
b22f83560c
commit
f392e0c7a8
@ -35,11 +35,17 @@ import javax.naming.ldap.Control;
|
||||
*/
|
||||
public class PasswordPolicyControl implements Control {
|
||||
|
||||
//~ Static fields/initializers ============================================
|
||||
|
||||
/** OID of the Password Policy Control */
|
||||
public static final String OID = "1.3.6.1.4.1.42.2.27.8.5.1";
|
||||
|
||||
//~ Instance fields =======================================================
|
||||
|
||||
private boolean critical;
|
||||
|
||||
//~ Constructors ==========================================================
|
||||
|
||||
/**
|
||||
* Creates a non-critical (request) control.
|
||||
*/
|
||||
@ -57,6 +63,8 @@ public class PasswordPolicyControl implements Control {
|
||||
this.critical = critical;
|
||||
}
|
||||
|
||||
//~ Methods ================================================================
|
||||
|
||||
/**
|
||||
* Returns the OID of the Password Policy Control.
|
||||
*/
|
||||
|
@ -57,15 +57,18 @@ import netscape.ldap.ber.stream.BEREnumerated;
|
||||
*/
|
||||
public class PasswordPolicyResponseControl extends PasswordPolicyControl {
|
||||
|
||||
//~ Static fields/initializers ============================================
|
||||
|
||||
private static final Log logger = LogFactory.getLog(PasswordPolicyResponseControl.class);
|
||||
|
||||
public static final int ERROR_NONE = -1;
|
||||
|
||||
public static final int ERROR_PASSWORD_EXPIRED = 0;
|
||||
public static final int ERROR_ACCOUNT_LOCKED = 1;
|
||||
|
||||
public static final int WARNINGS_DEFAULT = -1;
|
||||
|
||||
|
||||
//~ Instance fields =======================================================
|
||||
|
||||
private byte[] encodedValue;
|
||||
|
||||
private int errorCode = ERROR_NONE;
|
||||
@ -79,6 +82,8 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
|
||||
"invalid password syntax", "password too short", "password too young",
|
||||
"password in history" };
|
||||
|
||||
//~ Constructors ==========================================================
|
||||
|
||||
public PasswordPolicyResponseControl(byte[] encodedValue) {
|
||||
this.encodedValue = encodedValue;
|
||||
|
||||
@ -92,6 +97,8 @@ public class PasswordPolicyResponseControl extends PasswordPolicyControl {
|
||||
}
|
||||
}
|
||||
|
||||
//~ Methods ================================================================
|
||||
|
||||
/**
|
||||
* Decodes the Ber encoded control data.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user