-
1. Re: How Can I push/pop the subjectContext
method_ben_qc Feb 9, 2012 10:10 AM (in response to method_ben_qc)The class org.jboss.security.client.SecurityClient is used instead of org.jboss.security.SecurityAssociation for pushing/poping the subject context on the stack.
Here's the way to push/pop the subject context:
public static void pushSubjectContext(String principal, String credential)
{
try
{
SecurityClient securityClient = getSecurityClient();
securityClient.setSimple(principal, credential);
securityClient.login();
}
catch(Exception e)
{
throw new InternalException(e);
}
}
public static void popSubjectContext()
{
try
{
getSecurityClient().logout();
}
catch(Exception e)
{
throw new InternalException(e);
}
}
-
2. Re: How Can I push/pop the subjectContext
method_ben_qc Feb 9, 2012 10:11 AM (in response to method_ben_qc)1 of 1 people found this helpfulTakea look at: https://community.jboss.org/message/141171