Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acegisecurity.providers
Class TestingAuthenticationProvider  view TestingAuthenticationProvider download TestingAuthenticationProvider.java

java.lang.Object
  extended byorg.acegisecurity.providers.TestingAuthenticationProvider
All Implemented Interfaces:
AuthenticationProvider

public class TestingAuthenticationProvider
extends java.lang.Object
implements AuthenticationProvider

An AuthenticationProvider implementation for the TestingAuthenticationToken.

It simply accepts as valid whatever is contained within the TestingAuthenticationToken.

The purpose of this implementation is to facilitate unit testing. This provider should never be enabled on a production system.

Version:
$Id: TestingAuthenticationProvider.java,v 1.3 2005/11/17 00:55:49 benalex Exp $

Constructor Summary
TestingAuthenticationProvider()
           
 
Method Summary
 org.acegisecurity.Authentication authenticate(org.acegisecurity.Authentication authentication)
          Performs authentication with the same contract as AuthenticationManager.authenticate(Authentication)>AuthenticationManager.authenticate(Authentication) 55 .
 boolean supports(java.lang.Class authentication)
          Returns true if this AuthenticationProvider supports the indicated Authentication object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestingAuthenticationProvider

public TestingAuthenticationProvider()
Method Detail

authenticate

public org.acegisecurity.Authentication authenticate(org.acegisecurity.Authentication authentication)
                                              throws org.acegisecurity.AuthenticationException
Description copied from interface: AuthenticationProvider
Performs authentication with the same contract as AuthenticationManager.authenticate(Authentication)>AuthenticationManager.authenticate(Authentication) 55 .

Specified by:
authenticate in interface AuthenticationProvider

supports

public boolean supports(java.lang.Class authentication)
Description copied from interface: AuthenticationProvider
Returns true if this AuthenticationProvider supports the indicated Authentication object.

Returning true does not guarantee an AuthenticationProvider will be able to authenticate the presented instance of the Authentication class. It simply indicates it can support closer evaluation of it. An AuthenticationProvider can still return null from the AuthenticationProvider.authenticate(Authentication) 55 method to indicate another AuthenticationProvider should be tried.

Selection of an AuthenticationProvider capable of performing authentication is conducted at runtime the ProviderManager.

Specified by:
supports in interface AuthenticationProvider