/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: LDAPUser.java,v 1.3 2008/06/25 05:41:36 qcheng Exp $
*
*/
/**
* Portions Copyrighted [2011] [ForgeRock AS]
*/
/**
* This class represents user who is going to be authorized to log onto the
* server. This class also contains the user credentials. Currently the
* credential information is password only, but it extensible to certificates.
*/
public LDAPUser() {
}
public void process(
) {
}
// Get the bind dn
}
// The auth type.
{
} else {
}
// If this element is the password.
}
}
}
/**
* Get the authentication ID of this user.
*
* @return String The LDAP Bind DN
*/
return ANONYMOUS_USER;
return userName;
}
/**
* Get the authentication password.
*
* @return String the bind password.
*/
if (userPasswd == null)
return ANONYMOUS_PASSWD;
/*
* return (String) AccessController.doPrivileged( new
* DecodeAction(userPasswd));
*/
}
/**
* Get the type of authentication of this user.
*
* @return Type The authentication type.
*/
return userType;
}
return userID;
}
}
public static class Type {
/**
* The user has anonyomous rights.
*/
/**
* The user is authenticated with a rootdn and password.
*/
/**
* The user has proxy rights.
*/
/**
* This user must be used only for rebind
*/
/**
* This user has root privilages.
*/
}
}
if (equals(AUTH_ANONYMOUS)) {
return "ANONYMOUS";
}
if (equals(AUTH_BASIC)) {
return "BASIC";
}
if (equals(AUTH_PROXY)) {
return "PROXY";
}
if (equals(AUTH_REBIND)) {
return "REBIND";
}
if (equals(AUTH_ADMIN)) {
return "ADMIN";
}
return "ANONYMOUS";
}
}
}