org.ow2.jonas.security.iiop
Class SecurityContextHelper

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

public class SecurityContextHelper
extends AbsSecurityContextHelper

This class is used by Csiv2 server interceptor. It allows to authenticate users.

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

Field Summary
 
Fields inherited from class org.ow2.jonas.security.internal.AbsSecurityContextHelper
securityService
 
Method Summary
 String getIdentityToken()
           
 org.omg.GSSUP.InitialContextToken getInitialContextToken()
           
static SecurityContextHelper getInstance()
           
protected  org.objectweb.util.monolog.api.Logger getLogger()
           
protected  String getRealmDefault()
           
protected  String getRealmKey()
           
protected  void loginAuthenticationToken(String userName, String password)
          Authenticate with csiv2 authentication token
protected  void loginIdentiyToken(String principalName)
          Authenticate with csiv2 identity token (no password)
 
Methods inherited from class org.ow2.jonas.security.internal.AbsSecurityContextHelper
login, setSecurityService
 
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 String getRealmKey()
Specified by:
getRealmKey in class AbsSecurityContextHelper
Returns:
return the CSIV2 Realm key

getRealmDefault

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

loginAuthenticationToken

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

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

loginIdentiyToken

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

Parameters:
principalName - the username

getIdentityToken

public 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 UnsupportedEncodingException
Returns:
the identity of the authenticated user. In run-as, it returns run-as identity.
Throws:
UnsupportedEncodingException - if UTF-8 encoding is not supported


Copyright © 2010 OW2 Consortium. All Rights Reserved.