Package org.exist.security

Examples of org.exist.security.AuthenticationException


                if(checkAccountRestrictionList(username)) {
                    usernames.add(username);
                }
            }
        } catch(final NamingException ne) {
            LOG.error(new AuthenticationException(AuthenticationException.UNNOWN_EXCEPTION, ne.getMessage()));
        } finally {
            if(ctx != null) {
                LdapUtils.closeContext(ctx);
            }
        }
View Full Code Here


                if(checkAccountRestrictionList(username)) {
                    usernames.add(username);
                }
            }
        } catch(final NamingException ne) {
            LOG.error(new AuthenticationException(AuthenticationException.UNNOWN_EXCEPTION, ne.getMessage()));
        } finally {
            if(ctx != null) {
                LdapUtils.closeContext(ctx);
            }
        }
View Full Code Here

                if(checkAccountRestrictionList(username)) {
                    usernames.add(username);
                }
            }
        } catch(final NamingException ne) {
            LOG.error(new AuthenticationException(AuthenticationException.UNNOWN_EXCEPTION, ne.getMessage()));
        } finally {
            if(ctx != null) {
                LdapUtils.closeContext(ctx);
            }
        }
View Full Code Here

                if(checkGroupRestrictionList(groupname)) {
                    groupnames.add(groupname);
                }
            }
        } catch(final NamingException ne) {
            LOG.error(new AuthenticationException(AuthenticationException.UNNOWN_EXCEPTION, ne.getMessage()));
        } finally {
            if(ctx != null) {
                LdapUtils.closeContext(ctx);
            }
        }
View Full Code Here

                if(checkGroupRestrictionList(groupname)) {
                    groupnames.add(groupname);
                }
            }
        } catch(final NamingException ne) {
            LOG.error(new AuthenticationException(AuthenticationException.UNNOWN_EXCEPTION, ne.getMessage()));
        } finally {
            if(ctx != null) {
                LdapUtils.closeContext(ctx);
            }
        }
View Full Code Here

                if(checkGroupRestrictionList(groupname)) {
                    groupnames.add(groupname);
                }
            }
        } catch(final NamingException ne) {
            LOG.error(new AuthenticationException(AuthenticationException.UNNOWN_EXCEPTION, ne.getMessage()));
        } finally {
            if(ctx != null) {
                LdapUtils.closeContext(ctx);
            }
        }
View Full Code Here

                if(checkAccountRestrictionList(accountname)) {
                    usernames.add(accountname);
                }
            }
        } catch(final NamingException ne) {
            LOG.error(new AuthenticationException(AuthenticationException.UNNOWN_EXCEPTION, ne.getMessage()));
        } finally {
            if(ctx != null) {
                LdapUtils.closeContext(ctx);
            }
        }
View Full Code Here

                    groupMembers.add(member);
                }
            }

        } catch(final NamingException ne) {
            LOG.error(new AuthenticationException(AuthenticationException.UNNOWN_EXCEPTION, ne.getMessage()));
        } finally {
            if(ctx != null) {
                LdapUtils.closeContext(ctx);
            }
        }
View Full Code Here

          ne.close();
        }
      }
    } catch (NamingException e) {
      e.printStackTrace();
      throw new AuthenticationException(
          AuthenticationException.UNNOWN_EXCEPTION,
          e.getMessage());
    }

    if (ldapUser) {
      AbstractAccount account = (AbstractAccount) getAccount(username);
      if (account == null) {
        Subject currentSubject = getDatabase().getSubject();
                DBBroker broker = null;
        try {
                    broker = getDatabase().get(null);

                    //elevate to system privs
          broker.setSubject(getSecurityManager().getSystemSubject());

//                    account = getSecurityManager().addAccount(instantiateAccount(this, username));
          account = (AbstractAccount) getSecurityManager().addAccount(new UserAider(ID, username));
        } catch (Exception e) {
          throw new AuthenticationException(
              AuthenticationException.UNNOWN_EXCEPTION,
              e.getMessage(), e);
        } finally {
          if(broker != null) {
            broker.setSubject(currentSubject);
View Full Code Here

TOP

Related Classes of org.exist.security.AuthenticationException

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.