|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.itim.apps.jaas.callback.PlatformCallbackHandler
Default JAAS authentication callback handler for the identity platform. This
handler supports the callbacks required by the identity platform. This
handler, or a handler that also supports the required callbacks, must
be used to authentication to the platform. These required callbacks are the
javax.security.auth.callback.NameCallback,
javax.security.auth.callback.PasswordCallback, TenantCallback,
ChallengeResponseCallback, and LanguageCallback. In a single-tenant
deployment the TenantCallback does not need to return a value, an empty
string is acceptable. The ChallengeResponseCallback and LanguageCallback
need only return values if the authenticating user has forgotten their
password. However, since the CallbackHandler interface does not provide for
selective handling, all Callbacks must be supported even if they do not
provide values.
An additional callback may be issued if the platform context
information is not provided as properties to the application in the security
file. The LoginModule requires context information so that it can
communicate with the platform to perform the authentication.The properties
needed in the security file are:
url - URL of the platform
factory - JNDI initial context factory for looking up EJBs.
name - User Id to use to authenticate to the platform for login.
Note: this is not the usre being authenticated, but a priveledged EJB user
for connecting to the login EJB.
pswd - Password of the principal.
If these properties are not set in the file, the PlatformCallback will be
issued to the handler and it must be fulfilled. See setPlatformContext()
for setting the PlatformContext on this handler.
TenantCallback
,
ChallengeResponseCallback
,
PlatformContext
Constructor Summary | |
---|---|
PlatformCallbackHandler(java.lang.String userID,
java.util.Locale locale)
Constructs the handler with a user id and locale. |
|
PlatformCallbackHandler(java.lang.String userID,
java.lang.String password)
Constructs the handler with a user id and password. |
|
PlatformCallbackHandler(java.lang.String tenantID,
java.lang.String userID,
java.util.Locale locale)
Constructs the handler with a user id, locale, and tenant id. |
|
PlatformCallbackHandler(java.lang.String tenantID,
java.lang.String userID,
java.lang.String password)
Constructs the handler with a user id, password, and tenant id. |
Method Summary | |
---|---|
java.util.Map |
getChallenges()
Deprecated. Use getUserChallenges() instead |
int |
getRemainingAttempts()
Returns the number of unsuccessful login attempts remain before the user's account is suspended. |
java.util.Map |
getUserChallenges()
Retrieves the required challenges to be fulfilled by client for authentication without password. |
void |
handle(javax.security.auth.callback.Callback[] callbacks)
Handles the required callbacks. |
void |
setPlatformContext(PlatformContext context)
Sets the platform context. |
void |
setResponses(java.util.Map responses)
Changes the responses to the challenges for the user. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PlatformCallbackHandler(java.lang.String userID, java.lang.String password)
userID
- ID representing authenticating user.password
- Private password of the user.public PlatformCallbackHandler(java.lang.String tenantID, java.lang.String userID, java.lang.String password)
tenantID
- ID representing the tenant of the user.userID
- ID representing authenticating user.password
- Private password of the user.public PlatformCallbackHandler(java.lang.String userID, java.util.Locale locale)
userID
- ID representing authenticating user.locale
- Locale of the user.public PlatformCallbackHandler(java.lang.String tenantID, java.lang.String userID, java.util.Locale locale)
tenantID
- ID representing the tenant of the user.userID
- ID representing authenticating user.locale
- Locale of the user.Method Detail |
public void setPlatformContext(PlatformContext context)
context
- PlatformContext to connect with.public java.util.Map getChallenges() throws java.rmi.RemoteException, ApplicationException, AuthenticationException
java.rmi.RemoteException
- Thrown if unable to communicate with platform.
ApplicationException
- Thrown if unable to locate user.
AuthenticationException
- Thrown if unable to retrieve challenges.public java.util.Map getUserChallenges() throws java.rmi.RemoteException, ApplicationException, javax.security.auth.login.FailedLoginException
java.rmi.RemoteException
- Thrown if unable to communicate with platform.
ApplicationException
- Thrown if unable to locate user.
javax.security.auth.login.FailedLoginException
- Thrown if unable to retrieve challenges.public int getRemainingAttempts() throws java.rmi.RemoteException, ApplicationException
java.rmi.RemoteException
- Thrown if unable to communicate with platform.
ApplicationException
- Thrown if unable to locate user.public void setResponses(java.util.Map responses)
responses
- Map of challenges and the corresponding responses
for the user.The challenges must be the same as the
ones obtained from the getChallenges() call.public void handle(javax.security.auth.callback.Callback[] callbacks) throws java.io.IOException, javax.security.auth.callback.UnsupportedCallbackException
handle
in interface javax.security.auth.callback.CallbackHandler
callbacks
- Callback[] of authentication callbacks to be
handled.
javax.security.auth.callback.UnsupportedCallbackException
- Thrown if a callback is passed
to the handler it does not support.
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |