09-16-05 07:49 AM
Here is the code which I trying to read the principal
,but I am getting null.
import javax.security.jacc.*;
import java.security.*;
import javax.security.auth.Subject;
import java.util.*;
public class SamplePolicy extends Policy
{
public boolean implies(ProtectionDomain domain, Permission permission){
Principal[] subjects = domain.getPrincipals();
if(subjects !=null && subjects.length>0){
sub = subjects[0].getName();
}
Can any one help me out.
Thanks,
B.Saroj kumar
[ Post a follow-up to this message ]
|