Package org.exist.security.internal

Examples of org.exist.security.internal.AccountImpl$SecurityProperties


                        mockConfiguration
                    }
                )
        );

        AccountImpl mockAccountImpl = EasyMock.createMock(AccountImpl.class,
            new ConstructorArgs(
                AccountImpl.class.getDeclaredConstructor(AbstractRealm.class, String.class),
                new Object[] {
                    mockRealm,
                    testAccountName
                }
            ),
            new Method[]{
                AccountImpl.class.getMethod("getRealm"),
                AccountImpl.class.getMethod("addGroup", Group.class)
            }
        );

       
        expect(mockAccountImpl.getRealm()).andReturn(mockRealm);
        expect(mockRealm.getGroup(testGroupName)).andReturn(null);
        //expect(mockAccountImpl.getRealm()).andReturn(mockRealm);
        //expect(mockRealm.getSecurityManager()).andReturn(mockSecurityManager);

        replay();

        mockAccountImpl.addGroup(testGroupName);

        verify();
    }
View Full Code Here


      return null;
    }
    final Digest digest = new Digest(request.getMethod());
    parseCredentials(digest, credentials);
    final SecurityManager secman = pool.getSecurityManager();
    final AccountImpl user = (AccountImpl)secman.getAccount(digest.username);
    if (user == null) {
      // If user does not exist then send a challenge request again
      if (sendChallenge) {sendChallenge(request, response);}
      return null;
    }
    if (!digest.check(user.getDigestPassword())) {
      // If password is incorrect then send a challenge request again
      if (sendChallenge) {sendChallenge(request, response);}
      return null;
    }
    return new SubjectAccreditedImpl(user, this);
View Full Code Here

                    public void execute(final Map<String, Account> principalDb) throws ConfigurationException {
                        if(name != null && !principalDb.containsKey(name)) {
                            //A account = instantiateAccount(this, conf);
                            final Account account;
                            try {
                                account = new AccountImpl(r, conf);
                            } catch (Throwable e) {
                                SecurityManagerImpl.LOG.error("Account object can't build up from '"+doc.getFileURI()+"'", e);
                                return;
                            }
View Full Code Here

               
                final Integer id = conf.getPropertyInteger("id");
                if (id != null && !getSecurityManager().hasUser(id)) {
                   
                    //A account = instantiateAccount(this, conf, true);
              final AccountImpl account = new AccountImpl( this, conf );
              account.removed = true;
       
                    getSecurityManager().addUser(account.getId(), account);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.exist.security.internal.AccountImpl$SecurityProperties

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.