Examples of SimpleUser


Examples of org.jboss.identity.idm.impl.api.model.SimpleUser

   }

   public RoleQuery setUser(String id)
   {
      checkNotNullArgument(id, "User id");
      this.user = new SimpleUser(id);
      return this;
   }
View Full Code Here

Examples of org.jboss.identity.idm.impl.api.model.SimpleUser

         return new SimpleGroup(groupId);
      }
      else
      {
         return new SimpleUser(id);
      }
   }
View Full Code Here

Examples of org.pentaho.platform.engine.security.SimpleUser

          }
        }
      }

      if ( aclUser != null ) {
        pentahoAclEntries.put( new SimpleUser( aclUser ), new SimplePermissionMask( aclValue ) );
      } else {
        pentahoAclEntries.put( new SimpleRole( aclRole ), new SimplePermissionMask( aclValue ) );
      }
    }
View Full Code Here

Examples of org.pentaho.platform.engine.security.SimpleUser

      @Override
      public Void call() throws Exception {
        RepositoryFile testFile = new RepositoryFile( "Test Folder", null, null ); //$NON-NLS-1$
        Map<IPermissionRecipient, IPermissionMask> perms = new LinkedHashMap<IPermissionRecipient, IPermissionMask>();
        perms.put( new SimpleUser( "suzy" ), new SimplePermissionMask( IPentahoAclEntry.PERM_EXECUTE ) );
        perms.put( new SimpleRole( "ROLE_POWER_USER" ), new SimplePermissionMask( IPentahoAclEntry.PERM_SUBSCRIBE ) );
        SpringSecurityPermissionMgr.instance().setPermissions( perms, testFile );
        PentahoBasicAclVoter voter = new PentahoBasicAclVoter();
        assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile, IPentahoAclEntry.PERM_EXECUTE ) );
        assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile, IPentahoAclEntry.PERM_SUBSCRIBE ) );
View Full Code Here

Examples of org.pentaho.platform.engine.security.SimpleUser

      @Override
      public Void call() throws Exception {
        RepositoryFile testFile = new RepositoryFile( "Test Folder", null, null ); //$NON-NLS-1$
        Map<IPermissionRecipient, IPermissionMask> perms = new LinkedHashMap<IPermissionRecipient, IPermissionMask>();
        perms.put( new SimpleUser( "suzy" ), new SimplePermissionMask( IPentahoAclEntry.PERM_NOTHING ) );
        perms.put( new SimpleRole( "ROLE_POWER_USER" ), new SimplePermissionMask(
          IPentahoAclEntry.PERM_FULL_CONTROL ) );
        SpringSecurityPermissionMgr.instance().getPermissions( testFile );

        // Now, the stage is set. We should be able to double-check that suzy
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

        }

        try {
            getLoginContext().login();
            setStatus(AuthenticationStatus.SUCCESS);
            setUser(new SimpleUser(credentials.getUsername())); //SEAMSECURITY-98
        } catch (LoginException e) {
            setStatus(AuthenticationStatus.FAILURE);
            log.error("JAAS authentication failed", e);
        }
    }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

    @Override
    public void authenticate() {
        if ("test".equals(creds.getUsername())) {
            this.setStatus(AuthenticationStatus.SUCCESS);
            this.setUser(new SimpleUser("test"));
        }
    }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

    @Inject
    Identity identity;

    public void authenticate() {
        if (identitySession != null) {
            User u = new SimpleUser(credentials.getUsername());

            try {
                boolean success = identitySession.getAttributesManager().validateCredentials(
                        u, new Credential[]{credentials.getCredential()});
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

        AttributesManager am = session.getAttributesManager();

        Map<String, Attribute> attrs = null;

        try {
            attrs = am.getAttributes(new SimpleUser(user.getUserName()));
        } catch (IdentityException e) {

            handleException("Cannot obtain attributes for user: " + user.getUserName() + "; ", e);

        }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleUser

    @Override
    public void authenticate() {
        if (credentials.getCredential() instanceof PasswordCredential
                && ((PasswordCredential) credentials.getCredential()).getValue().equals("secret")) {
            this.setStatus(AuthenticationStatus.SUCCESS);
            this.setUser(new SimpleUser(credentials.getUsername()));
        }
    }
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.