org.objectweb.jonas.security.iiop
Class SecurityContextHelper
java.lang.Object
org.objectweb.jonas.security.AbsSecurityContextHelper
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 loginpassword
- 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