org.blojsom.plugin.security
Class FormAuthenticationPlugin

java.lang.Object
  extended byorg.blojsom.plugin.admin.BaseAdminPlugin
      extended byorg.blojsom.plugin.security.FormAuthenticationPlugin
All Implemented Interfaces:
PermissionedPlugin, Plugin

public class FormAuthenticationPlugin
extends BaseAdminPlugin

This plugin performs authorization after prompting the user in a web form.

Since:
blojsom 3.1
Version:
$Id: FormAuthenticationPlugin.java,v 1.2 2007/01/17 02:35:13 czarneckid Exp $
Author:
Eric Broyles, David Czarnecki

Field Summary
 
Fields inherited from class org.blojsom.plugin.admin.BaseAdminPlugin
_authorizationProvider, _ignoreParams, _logger, _resourceManager, _servletConfig, ACTION_PARAM, ADMIN_ADMINISTRATION_PAGE, ADMIN_AJAX_RESPONSE, ADMIN_LOGIN_PAGE, BLOJSOM_ADMIN_MESSAGES_RESOURCE, BLOJSOM_ADMIN_PLUGIN_AUTHENTICATED_KEY, BLOJSOM_ADMIN_PLUGIN_OPERATION_RESULT, BLOJSOM_ADMIN_PLUGIN_PASSWORD_PARAM, BLOJSOM_ADMIN_PLUGIN_USERNAME, BLOJSOM_ADMIN_PLUGIN_USERNAME_KEY, BLOJSOM_ADMIN_PLUGIN_USERNAME_PARAM, BLOJSOM_PERMISSION_CHECKER, BLOJSOM_USER_AUTHENTICATED, LOGIN_ACTION, LOGIN_ERROR_TEXT_KEY, LOGOUT_ACTION, PAGE_ACTION, PLUGIN_ADMIN_INHERIT_APACHE_CREDENTIALS, SUBACTION_PARAM
 
Constructor Summary
FormAuthenticationPlugin()
          Default constructor.
 
Method Summary
 java.lang.String getInitialPage()
          Get the initial page to load on successful authentication.
 void init()
          Initialize the plugin
 Entry[] process(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Blog blog, java.util.Map context, Entry[] entries)
          Process the blog entries
 void setInitialPage(java.lang.String initialPage)
          Set the initial page to load on successful authentication.
 
Methods inherited from class org.blojsom.plugin.admin.BaseAdminPlugin
addOperationResultMessage, authenticateUser, checkPermission, cleanup, destroy, formatAdminResource, getAdminResource, getUsernameFromSession, setAuthorizationProvider, setResourceManager, setServletConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormAuthenticationPlugin

public FormAuthenticationPlugin()
Default constructor.

Method Detail

getInitialPage

public java.lang.String getInitialPage()
Get the initial page to load on successful authentication. This can be themed.

Returns:
Initail page to load on successful authentication

setInitialPage

public void setInitialPage(java.lang.String initialPage)
Set the initial page to load on successful authentication. This can be themed.

Parameters:
initialPage - Initial page to load on successful authentication

init

public void init()
          throws PluginException
Initialize the plugin

Specified by:
init in interface Plugin
Overrides:
init in class BaseAdminPlugin
Throws:
PluginException - If there is an error on initialization

process

public Entry[] process(javax.servlet.http.HttpServletRequest httpServletRequest,
                       javax.servlet.http.HttpServletResponse httpServletResponse,
                       Blog blog,
                       java.util.Map context,
                       Entry[] entries)
                throws PluginException
Process the blog entries

Specified by:
process in interface Plugin
Overrides:
process in class BaseAdminPlugin
Parameters:
httpServletRequest - Request
httpServletResponse - Response
blog - Blog instance
context - Context
entries - Blog entries retrieved for the particular request
Returns:
Modified set of blog entries
Throws:
PluginException - If there is an error processing the blog entries