org.objectweb.jonas.security.iiop
Class SecurityContextHelper

java.lang.Object
  extended by org.objectweb.jonas.security.AbsSecurityContextHelper
      extended by org.objectweb.jonas.security.iiop.SecurityContextHelper

public class SecurityContextHelper
extends AbsSecurityContextHelper

This class is used by Csiv2 server interceptor and by the JOnAS EJB provider Web Service. It allows to authenticate users.

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

Method Summary
 java.lang.String getIdentityToken()
           
 org.omg.GSSUP.InitialContextToken getInitialContextToken()
           
static SecurityContextHelper getInstance()
           
protected  org.objectweb.util.monolog.api.Logger getLogger()
           
protected  java.lang.String getRealmDefault()
           
protected  java.lang.String getRealmKey()
           
protected  void loginAuthenticationToken(java.lang.String userName, java.lang.String password)
          Authenticate with csiv2 authentication token
protected  void loginIdentiyToken(java.lang.String principalName)
          Authenticate with csiv2 identity token (no password)
 
Methods inherited from class org.objectweb.jonas.security.AbsSecurityContextHelper
login
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SecurityContextHelper getInstance()
Returns:
return the singleton instance

getLogger

protected org.objectweb.util.monolog.api.Logger getLogger()
Specified by:
getLogger in class AbsSecurityContextHelper
Returns:
the associated logger

getRealmKey

protected java.lang.String getRealmKey()
Specified by:
getRealmKey in class AbsSecurityContextHelper
Returns:
return the CSIV2 Realm key

getRealmDefault

protected java.lang.String getRealmDefault()
Specified by:
getRealmDefault in class AbsSecurityContextHelper
Returns:
return the CSIV2 default Realm

loginAuthenticationToken

protected void loginAuthenticationToken(java.lang.String userName,
                                        java.lang.String password)
Authenticate with csiv2 authentication token

Parameters:
userName - user for login
password - of the user

loginIdentiyToken

protected void loginIdentiyToken(java.lang.String principalName)
Authenticate with csiv2 identity token (no password)

Parameters:
principalName - the username

getIdentityToken

public java.lang.String getIdentityToken()
Returns:
the identity of the authenticated user. In run-as, it returns run-as identity.

getInitialContextToken

public org.omg.GSSUP.InitialContextToken getInitialContextToken()
                                                         throws java.io.UnsupportedEncodingException
Returns:
the identity of the authenticated user. In run-as, it returns run-as identity.
Throws:
java.io.UnsupportedEncodingException - if UTF-8 encoding is not supported