@Service @Singleton public class SecurityContextUtil extends Object implements org.glassfish.hk2.api.PostConstruct
| Modifier and Type | Field and Description |
|---|---|
static int |
STATUS_FAILED |
static int |
STATUS_PASSED |
static int |
STATUS_RETRY |
| Constructor and Description |
|---|
SecurityContextUtil() |
| Modifier and Type | Method and Description |
|---|---|
com.sun.enterprise.common.iiop.security.SecurityContext |
getSecurityContext(Object effective_target)
This is called by the CSIv2 interceptor on the client before
sending the IIOP message.
|
void |
postConstruct() |
static void |
receivedReply(int reply_status,
Object effective_target)
This is called by the CSIv2 interceptor on the client after
a reply is received.
|
void |
sendingReply(com.sun.enterprise.common.iiop.security.SecurityContext context)
This is called by the CSIv2 interceptor on the server before
sending the reply.
|
int |
setSecurityContext(com.sun.enterprise.common.iiop.security.SecurityContext context,
byte[] object_id,
String method,
Socket socket)
This is called by the CSIv2 interceptor on the server after
receiving the IIOP message.
|
static void |
unsetSecurityContext(boolean isLocal)
This is called on the server to unset the security context
this is introduced to prevent the re-use of the thread
security context on re-use of the thread.
|
public static final int STATUS_PASSED
public static final int STATUS_FAILED
public static final int STATUS_RETRY
public void postConstruct()
postConstruct in interface org.glassfish.hk2.api.PostConstructpublic com.sun.enterprise.common.iiop.security.SecurityContext getSecurityContext(Object effective_target) throws InvalidMechanismException, InvalidIdentityTokenException
the - effective_target field of the PortableInterceptor
ClientRequestInfo object.InvalidMechanismExceptionInvalidIdentityTokenExceptionpublic static void receivedReply(int reply_status,
Object effective_target)
the - reply status from the call. The reply status field
could indicate an authentication retry.
The following is the mapping of PI status to the reply_status field
PortableInterceptor::SUCCESSFUL -> STATUS_PASSED
PortableInterceptor::SYSTEM_EXCEPTION -> STATUS_FAILED
PortableInterceptor::USER_EXCEPTION -> STATUS_PASSED
PortableInterceptor::LOCATION_FORWARD -> STATUS_RETRY
PortableInterceptor::TRANSPORT_RETRY -> STATUS_RETRYthe - effective_target field of the PI ClientRequestInfo object.public int setSecurityContext(com.sun.enterprise.common.iiop.security.SecurityContext context,
byte[] object_id,
String method,
Socket socket)
the - SecurityContext which arrived in the IIOP message.public void sendingReply(com.sun.enterprise.common.iiop.security.SecurityContext context)
the - SecurityContext which arrived in the IIOP message.public static void unsetSecurityContext(boolean isLocal)
Copyright © 2013. All Rights Reserved.