Package org.apache.wiki.auth.login

## Class WikiCallbackHandler

- java.lang.Object
- - org.apache.wiki.auth.login.WikiCallbackHandler

All Implemented Interfaces:
  `javax.security.auth.callback.CallbackHandler`

    public class WikiCallbackHandler
    extends java.lang.Object
    implements javax.security.auth.callback.CallbackHandler

Handles logins made from inside the wiki application, rather than via the web container. This handler is instantiated in `AuthenticationManager.login(org.apache.wiki.api.core.Session,HttpServletRequest, String, String)`. If container-managed authentication is used, the `WebContainerCallbackHandler`is used instead. This callback handler is designed to be used with `UserDatabaseLoginModule`.

Since:
  2.3

### Constructor Summary

Constructors
`WikiCallbackHandler​(Engine engine, javax.servlet.http.HttpServletRequest request, java.lang.String username, java.lang.String password)` Create a new callback handler.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `handle​(javax.security.auth.callback.Callback[] callbacks)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### WikiCallbackHandler

    public WikiCallbackHandler​(Engine engine,
                               javax.servlet.http.HttpServletRequest request,
                               java.lang.String username,
                               java.lang.String password)

Create a new callback handler.

Parameters:
  `engine` - the Engine
  `request` - the user's HTTP request. If passed as `null`, later requests for `HttpRequestCallback` will return an UnsupportedCallbackException
  `username` - the username
  `password` - the password

### Method Detail

#### handle

    public void handle​(javax.security.auth.callback.Callback[] callbacks)
                throws java.io.IOException,
                       javax.security.auth.callback.UnsupportedCallbackException

Specified by:
  `handle` in interface `javax.security.auth.callback.CallbackHandler`
Throws:
  `java.io.IOException`
  `javax.security.auth.callback.UnsupportedCallbackException`
See Also:
  `CallbackHandler.handle(javax.security.auth.callback.Callback[])`