|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.nidp.authentication.local.LocalAuthenticationClass
public abstract class LocalAuthenticationClass
Field Summary | |
---|---|
static int |
AUTHENTICATED
Returns the value for authenticate ,
indicating the authentication was successful. |
static int |
HANDLED_REQUEST
Returns the value for authenticate , indicating that the
request was handled to query for more information that is necessary for
authentication to proceed. |
protected java.util.ArrayList<WSCCacheEntry> |
m_Credentials
|
protected NIDPPrincipal |
m_ExpiredPrincipal
|
protected boolean |
m_LECP
|
protected NIDPContext |
m_NIDPContext
|
protected PageToShow |
m_PageToShow
|
protected NIDPException |
m_PasswordException
|
protected java.util.Properties |
m_Properties
Contains the class and method properties defined in the admin utility as well as other system properties. |
protected HttpServletRequest |
m_Request
The current HttpServletRequest that is being processed. |
protected HttpServletResponse |
m_Response
The HttpServletResponse that will be responded to. |
protected NIDPSession |
m_Session
The current Novell Identity Server session. |
protected NIDPSessionData |
m_SessionData
|
protected java.util.ArrayList<UserAuthority> |
m_UserStores
|
static int |
NOT_AUTHENTICATED
Returns the value for authenticate , indicating that
the authentication was unsuccessful. |
static int |
PWD_EXPIRED
Returns the value for authenticate , indicating that
the user's password is expired. |
static int |
PWD_EXPIRING
Returns the value for authenticate , indicating that
the user's password is expiring. |
static int |
SHOW_JSP
|
static int |
SHOW_PAGE
|
static int |
SHOW_PAGE_TERMINATE
|
Constructor Summary | |
---|---|
LocalAuthenticationClass(java.util.Properties props,
java.util.ArrayList<UserAuthority> uStores)
Defines the constructor to be used by all classes to do local authentication. |
Method Summary | |
---|---|
protected void |
addCredential(WSCQToken token,
XMLBase value)
Add a credential used to authencicate. |
protected void |
addLDAPCredentials()
Adds the LDAP credentials except password |
protected void |
addPrincipalAttributes(java.lang.String strAttr,
java.lang.String[] values)
Sets attributes for a principal that has been authenticated. |
int |
authenticate()
Performs the authentication process. |
protected boolean |
authenticateWithPassword(java.lang.String userid,
java.lang.String password)
Authenticates a principal after locating it with a user id. |
protected boolean |
authenticateWithQuery(java.lang.String query,
java.lang.String password)
Authenticates a principal after locating it with an LDAP query. |
protected java.lang.String |
checkForQuery()
Checks for the use of a query string to access LDAP for user identification |
java.util.ArrayList<WSCCacheEntry> |
clearCredentials()
|
protected int |
doAuthenticate()
This is essentially an abstract method designed to be overloaded by authentication classes that intend to take advantage of secret store unlocking. |
protected int |
doAuthenticateNRL()
This is essentially an abstract method designed to be overloaded by authentication classes that intend to take advantage of secret store unlocking. |
protected java.lang.String |
escapeName(java.lang.String name)
Escape characters typed by user |
protected java.lang.String |
fillLDAPQueryString(java.lang.String query)
Takes a query string and fills it with data to use in an LDAP query to find a user |
protected NIDPPrincipal[] |
findPrincipals(java.lang.String userid)
Search for a principal in a list of user stores by user name. |
protected NIDPPrincipal[] |
findPrincipalsByQuery(java.lang.String filter)
Searches for a principal in a list of user stores by a given query. |
protected AuthnRequest |
getAuthnRequest()
Get the request that may have cause this authentication class to be invoked. |
protected boolean |
getBooleanProperty(java.lang.String property,
boolean deflt)
Gets a boolean value from class properties. |
protected AuthenticationCard[] |
getCards()
This method is now depricated. |
protected java.lang.String |
getContractURI()
Gets the URI of the contract for a request coming from an agent |
java.util.ArrayList<WSCCacheEntry> |
getCredentials()
Gets the list of credentials used to authenticate the user or principal. |
NIDPPrincipal |
getExpiredPrincipal()
|
java.lang.String |
getLogMsg()
Gets the message for the associated error id. |
PageToShow |
getPageToShow()
|
NIDPException |
getPasswordException()
|
NIDPPrincipal |
getPrincipal()
Gets the principal authenticated by this class. |
protected javax.naming.directory.Attributes |
getPrincipalAttributes(java.lang.String[] attrs)
Get attributes for the principal that has been authenticated. |
protected UserAuthority |
getPrincipalUserAuthority()
Gets the user authority for the identified principal, assuming that m_Principal has been set. |
protected java.util.ArrayList<java.lang.String> |
getProperties(java.lang.String prefix)
Gets all properties that have names starting with a given prefix. |
protected java.lang.String |
getProperty(java.lang.String property)
Gets a boolean property. |
protected java.lang.String |
getProvisionURL()
Deprecated. |
protected java.lang.String |
getReturnURL()
Returns the URL that any user interactions should post data back to. |
java.lang.String |
getType()
Gets the authentication type this class implements. |
protected UserAuthority |
getUserAuthority(int index)
Gets a specific user authority. |
protected int |
getUserAuthorityCount()
Get the number of searchable user authorities. |
protected java.lang.String |
getUserErrorMsg()
Gets the error message that will be displayed to the end user. |
java.lang.String |
getUserId()
Gets the user id for the associated authentication. |
void |
initializeRequest(HttpServletRequest request,
HttpServletResponse response,
NIDPSession session,
NIDPSessionData data,
boolean following,
java.lang.String url)
Initializes the authentication class with the current request/response. |
protected boolean |
isCancelAppropriate()
Deprecated. |
public boolean |
isCaptchaRequired()
|
protected boolean |
isDefinesUser()
Determines if this authentication class instance needs to identify a user. |
boolean |
isFailure()
Indicates whether or not this authentication failed. |
protected boolean |
isFirstCallAfterPrevMethod()
Determine if this authentication class instance is the result of an assertion being returned to an unauthenticated session |
protected boolean |
isFirstExecution()
|
protected boolean |
isFirstInstance()
Determines if this authentication class instance is the first since a the system started up or was reconfigured |
protected boolean |
isPendingAuthnRequest()
Determine if there is a pending authentication request that has come from a service provider. |
protected boolean |
isUserIdentification()
Deprecated |
boolean |
mustPersist()
Indicates if this class must persist during interaction with the user. |
protected void |
setErrorMsg(java.lang.String userErr,
java.lang.String logErr)
Set the error message to be seen by the end user as well as the error message to be put into the log file. |
protected void |
setErrorMsg(java.lang.String userErr,
java.lang.String logErr,
java.lang.String logParam)
Sets the error message to be seen by the end user, as well as the error message to be put into the log file. |
protected void |
setFailure()
Sets a failure state for the current authentication |
protected void |
setPasswordException(NIDPException PasswordException)
Allow password exceptions to be set |
protected void |
setPrincipal(NIDPPrincipal principal)
Sets the principal to be authenticated by this class. |
protected void |
setPrincipalAttributes(java.lang.String[] attrs,
java.lang.String[] values)
Sets attributes for a principal that has been authenticated. |
protected void |
setUserErrorMsg(java.lang.String userMsg)
Sets the error message to be displayed to an end user. |
void |
setUserId(java.lang.String userid)
Sets the user id for the associated authentication. |
protected int |
showError(NIDPError error)
Causes an error JSP to be executed to display an error message. |
protected void |
showJSP(java.lang.String jsp)
Forwards execution to a specific JSP. |
public boolean |
verifyRecaptcha()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int AUTHENTICATED
authenticate
,
indicating the authentication was successful.
public static final int HANDLED_REQUEST
authenticate
, indicating that the
request was handled to query for more information that is necessary for
authentication to proceed.
public static final int NOT_AUTHENTICATED
authenticate
, indicating that
the authentication was unsuccessful.
public static final int PWD_EXPIRING
authenticate
, indicating that
the user's password is expiring.
public static final int PWD_EXPIRED
authenticate
, indicating that
the user's password is expired.
public static final int SHOW_JSP
public static final int SHOW_PAGE
public static final int SHOW_PAGE_TERMINATE
protected NIDPContext m_NIDPContext
protected java.util.ArrayList<UserAuthority> m_UserStores
protected java.util.Properties m_Properties
protected HttpServletRequest m_Request
initializeRequest
protected HttpServletResponse m_Response
initializeRequest
protected NIDPSession m_Session
protected NIDPSessionData m_SessionData
protected PageToShow m_PageToShow
protected boolean m_LECP
protected java.util.ArrayList<WSCCacheEntry> m_Credentials
protected NIDPPrincipal m_ExpiredPrincipal
protected NIDPException m_PasswordException
Constructor Detail |
---|
public LocalAuthenticationClass(java.util.Properties props, java.util.ArrayList<UserAuthority> uStores)
props
- Properties associated with the implementing class.uStores
- Provides a list of ordered user stores to authenticate against.Method Detail |
---|
public void initializeRequest(HttpServletRequest request, HttpServletResponse response, NIDPSession session, NIDPSessionData data, boolean following, java.lang.String url)
request
- Specifies the HttpServletRequest that the request came in on.response
- Specifies the HttpServletResponse that the request will respond with.session
- Identifies the user's liberty session.following
- Specify true if this class is following a previous method.url
- Identifies the URL to return to after completion of context.public NIDPException getPasswordException()
public NIDPPrincipal getExpiredPrincipal()
public java.lang.String getType()
public NIDPPrincipal getPrincipal()
protected void setPrincipal(NIDPPrincipal principal)
principal
- The principal to be considered authenticated.public boolean isFailure()
protected void setFailure()
protected java.lang.String getProvisionURL()
protected java.lang.String getReturnURL()
public boolean mustPersist()
protected boolean isFirstInstance()
protected boolean isCancelAppropriate()
protected boolean isDefinesUser()
protected boolean isUserIdentification()
protected boolean isFirstCallAfterPrevMethod()
protected boolean isPendingAuthnRequest()
protected AuthnRequest getAuthnRequest()
protected java.lang.String getContractURI()
protected boolean isFirstExecution()
protected AuthenticationCard[] getCards()
public PageToShow getPageToShow()
protected int showError(NIDPError error)
msg
- The error message that is to be displayed.protected void showJSP(java.lang.String jsp)
jsp
- Specifies the JSP to which control should be forwarded.protected void setErrorMsg(java.lang.String userErr, java.lang.String logErr)
userErr
- The message to be displayed to the end user.logErr
- The message to log for the administrator.protected void setErrorMsg(java.lang.String userErr, java.lang.String logErr, java.lang.String logParam)
userErr
- The message to be displayed to the end user.logErr
- The message to log for the administrator.logParam
- The parameter to be used as part of the log file error message.protected void setUserErrorMsg(java.lang.String userMsg)
userMsg
- The message to display to the end user on an error page.protected java.lang.String getUserErrorMsg()
public java.lang.String getLogMsg()
public java.lang.String getUserId()
public void setUserId(java.lang.String userid)
user
- idprotected void addLDAPCredentials()
protected void addCredential(WSCQToken token, XMLBase value)
token
- The credential token used.value
- The credential value.public java.util.ArrayList<WSCCacheEntry> getCredentials()
public java.util.ArrayList<WSCCacheEntry> clearCredentials()
protected java.lang.String escapeName(java.lang.String name)
name
- The user name.
protected int getUserAuthorityCount()
getUserAuthority
protected UserAuthority getUserAuthority(int index)
index
- The index of the user authority to be obtained.
getUserAuthorityCount
protected UserAuthority getPrincipalUserAuthority()
getUserAuthority
,
getPrincipal
protected boolean authenticateWithPassword(java.lang.String userid, java.lang.String password) throws PasswordExpiredException, PasswordExpiringException
userid
- Specifies the id of the user/principal to locate.password
- The password with which to authenticate the user/principal.
PasswordExpiredException
- An exception that occurs only with eDir indicating user's password has expired.
PasswordExpiringException
- An exception that occurs only with eDir indicating user's password is about to expire.protected boolean authenticateWithQuery(java.lang.String query, java.lang.String password) throws PasswordExpiredException, PasswordExpiringException
query
- Specifies the LDAP query to use to identify the principal.password
- The password with which to authenticate the principal.
PasswordExpiredException
- An exception that occurs only with eDir indicating user's password has expired.
PasswordExpiringException
- An exception that occurs only with eDir indicating user's password is about to expire.protected NIDPPrincipal[] findPrincipals(java.lang.String userid)
userid
- The id of the user to search for.
protected NIDPPrincipal[] findPrincipalsByQuery(java.lang.String filter)
filter
- The filter or query to use.
protected javax.naming.directory.Attributes getPrincipalAttributes(java.lang.String[] attrs)
attrs
- Specifies an array of strings representing the attributes to obtain.
protected void setPrincipalAttributes(java.lang.String[] attrs, java.lang.String[] values) throws NIDPException
attrs
- Specifies an array of strings representing the attributes to obtain.values
- Specifies an array of value objects to associate with attributes
in attribute array.
NIDPException
protected void addPrincipalAttributes(java.lang.String strAttr, java.lang.String[] values) throws NIDPException
attrs
- Specifies an array of strings representing the attributes to obtain.values
- Specifies an array of value objects to associate with attributes
in attribute array.
NIDPException
protected java.lang.String getProperty(java.lang.String property)
property
- The property name to obtain.
protected java.util.ArrayList<java.lang.String> getProperties(java.lang.String prefix)
prefix
- The prefix used to match returned properties.
protected boolean getBooleanProperty(java.lang.String property, boolean deflt)
property
- Specifies the name of the boolean value property to obtain.deflt
- The value to return if the property is not found.
public int authenticate()
AUTHENTICATED
, NOT_AUTHENTICATED
,
CANCELLEDCANCEL
, HANDLED_REQUEST
,
PWD_EXPIRING
, OR PWD_EXPIRED
.protected int doAuthenticate()
protected int doAuthenticateNRL()
protected java.lang.String checkForQuery()
protected java.lang.String fillLDAPQueryString(java.lang.String query)
query
- the query string defined by administrator
protected void setPasswordException(NIDPException PasswordException)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |