Package org.glassfish.security.common

Examples of org.glassfish.security.common.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(SecurityLoggerInfo.nullSubjectWarning);
            }
  }
  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

  } 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

        PrincipalGroupFactory factory = Globals.getDefaultHabitat().getService(PrincipalGroupFactory.class);
        if (factory != null)
            _userPrincipal =
                factory.getPrincipalInstance(getUsername(),realm_name);
        else
            _userPrincipal = new PrincipalImpl(getUsername());

        Set<Principal> principalSet = _subject.getPrincipals();
        if (!principalSet.contains(_userPrincipal)){
            principalSet.add(_userPrincipal);
        }
View Full Code Here

        List<GroupMap> groupsMap = getGroupsMap(maps);

        HashMap eisASMap = new HashMap();

        for(PrincipalMap map : principalsMap){
            eisASMap.put(new PrincipalImpl(map.getEisPrincipal()), new PrincipalImpl(map.getMappedPrincipal()));
        }

        for(GroupMap map : groupsMap){
            eisASMap.put(new Group(map.getEisGroup()), new Group(map.getMappedGroup()));
        }
View Full Code Here

        Principal asPrincipal = null;
        if (eisPrincipal != null) {
            asPrincipal = (PrincipalImpl) securityMap.get(eisPrincipal);
            debug("got mapped principal as [" + asPrincipal + "] for eis-group [" + eisPrincipal.getName() + "]");
        } else if (eisName != null) {
            asPrincipal = ((PrincipalImpl) securityMap.get(new PrincipalImpl(eisName)));
            debug("got mapped principal as [" + asPrincipal + "] for eis-group [" + eisName + "]");
        }
        return asPrincipal;
    }
View Full Code Here

TOP

Related Classes of org.glassfish.security.common.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.