Package org.apache.wiki.auth.login

# Class WikiCallbackHandler

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

All Implemented Interfaces:
  `CallbackHandler`

public class WikiCallbackHandler extends Object implements 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
Constructor
Description
`WikiCallbackHandler(org.apache.wiki.api.core.Engine engine, jakarta.servlet.http.HttpServletRequest request, String username, String password)`
Create a new callback handler.

## Method Summary

Modifier and Type
Method
Description
`void`
`handle(Callback[] callbacks)`

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

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

## Constructor Details

### WikiCallbackHandler

public WikiCallbackHandler(org.apache.wiki.api.core.Engine engine, jakarta.servlet.http.HttpServletRequest request, String username, 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 Details

### handle

public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException

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