Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.PrincipalImpl


     * @param The Credentials of the user.
     */
    public ClientSecurityContext(String userName,
         Subject s) {

  this.initiator = new PrincipalImpl(userName);
  this.subject = s ;
    }
View Full Code Here


      s = new Subject();
            if (_logger.isLoggable(Level.WARNING)) {
          _logger.warning("java_security.null_subject");
            }
  }
  this.initiator = new PrincipalImpl(userName);
        final Subject sub = s;
        this.subject = (Subject)
            AppservAccessController.doPrivileged(new PrivilegedAction(){
                public java.lang.Object run() {
                    sub.getPrincipals().add(initiator);
View Full Code Here

    } finally {
        if (guestUser == null) {
      guestUser = "ANONYMOUS";
        }
    }
    defaultSecurityContext.initiator = new PrincipalImpl(guestUser);
      }
  }
  return defaultSecurityContext.initiator;
    }
View Full Code Here

     * @param value it's associated value
     */
    public void setElementValue(XMLElement element, String value) {
       
        if (RuntimeTagNames.NAME.equals(element.getQName())) {
            principal = new PrincipalImpl(value);
        } else super.setElementValue(element, value);
    }    
View Full Code Here

public class PrincipalGroupFactory {
   
    /** Creates a new instance of PrincipalGroupFactory */

    public static PrincipalImpl getPrincipalInstance(String name, String realm){
        PrincipalImpl p = (PrincipalImpl)WebSecurityManager.getAdminPrincipal(name, realm) ;
        if(p == null){
            p = new PrincipalImpl(name);
        }
        return p;
    }
View Full Code Here

                    if (sr != null) {
                        for (int i = 0; i < sr.length; i++) {
                            String[] principal = sr[i].getPrincipalName();
                            if (principal != null) {
                                for (int plen = 0; plen < principal.length; plen++) {
                                    ADMIN_PRINCIPAL.put(realmName + principal[plen], new PrincipalImpl(principal[plen]));
                                }
                            }
                            List<String> groups = sr[i].getGroupNames();
                            for (int glen = 0; glen < groups.size(); glen++) {
                                ADMIN_GROUP.put(realmName + groups.get(glen), new Group(groups.get(glen)));
View Full Code Here

  } else {
      // add a Principal (authenticated identity)
      // to the Subject

      // assume the user we authenticated is the PrincipalImpl
      userPrincipal = new PrincipalImpl(username);
      if (!subject.getPrincipals().contains(userPrincipal)){
    subject.getPrincipals().add(userPrincipal);
            }
            _logger.log(Level.FINE,"\t\t[ClientPasswordLoginModule] " +
                        "added PrincipalImpl to Subject");
View Full Code Here

  } else {
      // add a Principal (authenticated identity)
      // to the Subject

      // assume the user we authenticated is the PrincipalImpl
      userPrincipal = new PrincipalImpl(alias);
      if (!subject.getPrincipals().contains(userPrincipal)){
    subject.getPrincipals().add(userPrincipal);
            }

      if (debug) {
View Full Code Here

        if (principal == null) {
            if (cpCallback.getName() != null) {
                if (isCertRealm) {
                    principal = new X500Principal(cpCallback.getName());
                } else {
                    principal = new PrincipalImpl(cpCallback.getName());
                }
            } else {
                // 196 unauthenticated caller principal
                principal = SecurityContext.getDefaultCallerPrincipal();
            }
View Full Code Here

           
            // recover principles
            Enumeration users = r.getUsersAssignedTo(new Role(role));
            Set<Principal> usersToRole = new HashSet<Principal>();
            for(;users.hasMoreElements(); ){
                PrincipalImpl gp = (PrincipalImpl) users.nextElement();
                usersToRole.add(new PrincipalImpl(gp.getName()));
                addRoleToPrincipal(gp,role);
            }
            this.roleToPrincipal.put(role,usersToRole);
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.PrincipalImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.