net.sf.jguard.core.authentication.schemes
Class HookFormSchemeHandler

java.lang.Object
  extended by net.sf.jguard.core.authentication.schemes.HookFormSchemeHandler
All Implemented Interfaces:
AuthenticationSchemeHandler

public class HookFormSchemeHandler
extends java.lang.Object
implements AuthenticationSchemeHandler

permits to set Login and password directly. It follows the architecture design, but permits to hook it.

Since:
1.1
Author:
Charles Gay

Constructor Summary
HookFormSchemeHandler(java.util.Map<java.lang.String,java.lang.String> parameters, AuthenticationBindingsFactory factory)
           
 
Method Summary
 boolean answerToChallenge(AccessContext context)
          evaluate if the user tries to answer to the challenge.
 void authenticationFailed(AccessContext context)
          translate in the underlying technology the authentication failure.
 void authenticationSucceed(AccessContext context)
          translate in the underlying technology the authentication success.
 void buildChallenge(AccessContext context)
          create a challenge in the underlying technology way.
 java.util.Collection<java.lang.Class> getCallbackTypes()
          return Callbacks classes needed by LoginModules to authenticate the client.
 java.security.PermissionCollection getGrantedPermissions()
           
 java.lang.String getName()
          unique name of the Authentication Scheme.
 void handleSchemeCallbacks(AccessContext context, java.util.List<javax.security.auth.callback.Callback> cbks)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HookFormSchemeHandler

public HookFormSchemeHandler(java.util.Map<java.lang.String,java.lang.String> parameters,
                             AuthenticationBindingsFactory factory)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: AuthenticationSchemeHandler
unique name of the Authentication Scheme.

Specified by:
getName in interface AuthenticationSchemeHandler
Returns:

buildChallenge

public void buildChallenge(AccessContext context)
                    throws AuthenticationException
Description copied from interface: AuthenticationSchemeHandler
create a challenge in the underlying technology way.

Specified by:
buildChallenge in interface AuthenticationSchemeHandler
Throws:
AuthenticationException

authenticationSucceed

public void authenticationSucceed(AccessContext context)
                           throws AuthenticationException
Description copied from interface: AuthenticationSchemeHandler
translate in the underlying technology the authentication success.

Specified by:
authenticationSucceed in interface AuthenticationSchemeHandler
Throws:
AuthenticationException

authenticationFailed

public void authenticationFailed(AccessContext context)
                          throws AuthenticationException
Description copied from interface: AuthenticationSchemeHandler
translate in the underlying technology the authentication failure.

Specified by:
authenticationFailed in interface AuthenticationSchemeHandler
Throws:
AuthenticationException

getCallbackTypes

public java.util.Collection<java.lang.Class> getCallbackTypes()
Description copied from interface: AuthenticationSchemeHandler
return Callbacks classes needed by LoginModules to authenticate the client.

Specified by:
getCallbackTypes in interface AuthenticationSchemeHandler
Returns:

getGrantedPermissions

public java.security.PermissionCollection getGrantedPermissions()
Specified by:
getGrantedPermissions in interface AuthenticationSchemeHandler

answerToChallenge

public boolean answerToChallenge(AccessContext context)
Description copied from interface: AuthenticationSchemeHandler
evaluate if the user tries to answer to the challenge.

Specified by:
answerToChallenge in interface AuthenticationSchemeHandler
Returns:

handleSchemeCallbacks

public void handleSchemeCallbacks(AccessContext context,
                                  java.util.List<javax.security.auth.callback.Callback> cbks)
                           throws javax.security.auth.callback.UnsupportedCallbackException
Specified by:
handleSchemeCallbacks in interface AuthenticationSchemeHandler
Throws:
javax.security.auth.callback.UnsupportedCallbackException


Copyright © 2004-2009. All Rights Reserved.