How to get the User Name from the Principal Object using the JACC Policy Class
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Portal Server > How to get the User Name from the Principal Object using the JACC Policy Class




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How to get the User Name from the Principal Object using the JACC Policy Class  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:46 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register