Class LocalIdPasswordLookup
- java.lang.Object
-
- org.sourceid.saml20.adapter.sp.authn.LocalIdPasswordLookup
-
public abstract class LocalIdPasswordLookup extends Object
An abstract class that provides much of the needed implementation for form user-based authentication. Implementers need only extend and implement thelookupViaPassword(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, String, String)method. An implementation ofSpAuthenticationAdaptermight have an instance of this class and delegate calls toSpAuthenticationAdapter.lookupLocalUserId(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, String, String).
-
-
Constructor Summary
Constructors Constructor Description LocalIdPasswordLookup()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringgetLocalIdentifier(String username, String password)Takes a username/password and translates into a local identifer.intgetMaxUserChallengeRetries()This method dictates the number of unsuccessful login attempts a user can make before the login is considered to have failed.StringlookupViaPassword(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, String entityId, String resumePath)Lookup the local user identifier via form based username/password authentication and delegate validation of the username/password to thegetLocalIdentifier(String username, String password).voidsetMaxUserChallengeRetries(int maxUserChallengeRetries)Sets the number of unsuccessful login attempts a user can make before the login is considered to have failed.
-
-
-
Method Detail
-
getLocalIdentifier
public abstract String getLocalIdentifier(String username, String password)
Takes a username/password and translates into a local identifer. An implementation might validate the credentials against a DB or LDAP server, for example, and return the appropriate local identifier - often just the username itself.- Parameters:
username- the username obtained from the user via the HTML form.password- the password obtained from the user via the HTML form.- Returns:
- the local user identifier, or null if authentication fails.
-
lookupViaPassword
public String lookupViaPassword(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, String entityId, String resumePath) throws IOException
Lookup the local user identifier via form based username/password authentication and delegate validation of the username/password to thegetLocalIdentifier(String username, String password).- Parameters:
req- the HttpServletRequestresp- the HttpServletResponseentityId- the entityId of the IdP.resumePath- the relative URL that the user agent needs to return to, when it needs to operate asynchronously. This value can usually just be passed though directly from an implementation ofSpAuthenticationAdapter.lookupLocalUserId(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, String, String).- Returns:
- a String that uniquely identifies the user to the local system. PingFederate will 'link' this value with the external identifier provided by the IdP.
- Throws:
IOException- if an IOException occurs when writing the HTTP response.
-
getMaxUserChallengeRetries
public int getMaxUserChallengeRetries()
This method dictates the number of unsuccessful login attempts a user can make before the login is considered to have failed. The default is 3.- Returns:
- the number unsuccessful login attempts a user can make before the login is considered to have failed.
-
setMaxUserChallengeRetries
public void setMaxUserChallengeRetries(int maxUserChallengeRetries)
Sets the number of unsuccessful login attempts a user can make before the login is considered to have failed.
-
-