org.ow2.jonas.security.internal
Class AbsSecurityContextHelper

java.lang.Object
  extended by org.ow2.jonas.security.internal.AbsSecurityContextHelper
Direct Known Subclasses:
SecurityContextHelper, SecurityContextHelper

public abstract class AbsSecurityContextHelper
extends Object

This class allows to authenticate users. It's a singleton to allow inherence and "static" methods.

Author:
Florent Benoit : Initial Developper, Helene Joanin : Refactoring

Field Summary
protected  SecurityService securityService
          ref on the SecurityService
 
Constructor Summary
AbsSecurityContextHelper()
           
 
Method Summary
protected abstract  org.objectweb.util.monolog.api.Logger getLogger()
           
protected abstract  String getRealmDefault()
           
protected abstract  String getRealmKey()
           
 void login(String principalName, String credential)
          Login with given principal and given credential
 void setSecurityService(SecurityService sec)
          Set the SecurityService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

securityService

protected SecurityService securityService
ref on the SecurityService

Constructor Detail

AbsSecurityContextHelper

public AbsSecurityContextHelper()
Method Detail

getLogger

protected abstract org.objectweb.util.monolog.api.Logger getLogger()
Returns:
return the associated logger

getRealmKey

protected abstract String getRealmKey()
Returns:
return the Realm Key

getRealmDefault

protected abstract String getRealmDefault()
Returns:
return the default realm value

setSecurityService

public void setSecurityService(SecurityService sec)
Set the SecurityService. Avoids to use the ServiceManager here.

Parameters:
sec - SecurityService

login

public void login(String principalName,
                  String credential)
Login with given principal and given credential

Parameters:
principalName - the login
credential - the password


Copyright © 2010 OW2 Consortium. All Rights Reserved.