Examples of Principal


Examples of de.iritgo.aktera.permissions.security.Principal

    {
      return true;
    }

    loadAclForUser(userName);
    Principal principal = (Principal) principals.get(userName);
    if (principal == null)
    {
      return false;
    }
View Full Code Here

Examples of gabriel.Principal

   * ACL lists by name with one default list "Default".
   */
  public AccessManagerImpl(AclStore store) {
    this.store = store;

    owner = new Principal("owner");
    acl = store.getAcl(owner, "access");
  }
View Full Code Here

Examples of istmo.plus.vistas.Principal

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new Principal().setVisible(true);
            }
        });
    }
View Full Code Here

Examples of java.security.Principal

      Object sc = null;
        if (this.loginContext != null) {
          sc = this.securityHelper.getSecurityContext(this.securitydomain);
          if ( sc == null){
            Subject subject = this.loginContext.getSubject();
            Principal principal = null;
            for(Principal p:subject.getPrincipals()) {
              if (this.userName.startsWith(p.getName())) {
                principal = p;
                break;
              }
View Full Code Here

Examples of java.security.Principal

      throw new LoginException("Failed to decode password: "+e.getMessage()); //$NON-NLS-1$
    }
  } 

  protected Principal getIdentity() {
    Principal principal = new SimplePrincipal(this.mappedRole);
    return principal;       
  }
View Full Code Here

Examples of java.security.Principal

  private String getPrincipal() {
    // Retrieve the principal (members of the Group.class)   
    Set principals = subject.getPrincipals(Principal.class);
    Iterator iterator = principals.iterator();
    while (iterator.hasNext()) {
      Principal principal = (Principal) iterator.next();
      if (logger.isLoggable(BasicLevel.DEBUG))
        logger.log(BasicLevel.DEBUG, "getPrincipal class = " + principal.getClass().getName());
      // Signed group (empty group that contains a signature)?
      if (principal instanceof JPrincipal) {
        if (logger.isLoggable(BasicLevel.DEBUG))
          logger.log(BasicLevel.DEBUG, "getPrincipal name = " + ((JPrincipal)principal).getName());
        return principal.getName();
      }
    }
    return null;
  }
View Full Code Here

Examples of java.security.Principal

      if (group instanceof JSigned) {
        continue;
      }
      Enumeration e = group.members();
      while (e.hasMoreElements()) {
        Principal p = (Principal) e.nextElement();
        principalRoles.add(p.getName());
      }
    }
    return principalRoles.toArray();
  }
View Full Code Here

Examples of java.security.Principal

       
        assertEquals("@", TeiidLoginContext.getBaseUsername("@")); //$NON-NLS-1$ //$NON-NLS-2$
    }

    private TeiidLoginContext createMembershipService() throws Exception {
      Principal p = Mockito.mock(Principal.class);
      Mockito.stub(p.getName()).toReturn("alreadylogged"); //$NON-NLS-1$
      HashSet<Principal> principals = new HashSet<Principal>();
      principals.add(p);
     
      Subject subject = new Subject(false, principals, new HashSet(), new HashSet());
      SecurityHelper sh = Mockito.mock(SecurityHelper.class);
View Full Code Here

Examples of java.security.Principal

    if (this.request == null)
      return null;
    Object uRoleObj = this.session
        .getAttribute(CacheProvider.USER_PRINCIPAL_CACHE_KEY_PREFIX);
    if (uRoleObj == null) {
      Principal userPrincipal = this.request.getUserPrincipal();
      if (userPrincipal != null) {
        String userName = userPrincipal.getName();
        String cacheName = CacheProvider.USER_PRINCIPAL_CACHE_KEY_PREFIX
            + userName;

        if (this.cacheProvider != null && this.cacheProvider.isAvailable()) {
          uRoleObj = this.cacheProvider.get(cacheName);
View Full Code Here

Examples of java.security.Principal

  }

  @Get
  @Path("userRoles")
  public UserSecurityInfo listCurrentUserRoles() {
    Principal userPrincipal = this.request.getUserPrincipal();
    if (userPrincipal != null) {
      String name = userPrincipal.getName();
      List<Role> roles = this.listUserRoles(name);
      List<String> roleNames = new ArrayList<String>();
      for (Role r : roles)
        roleNames.add(r.getName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.