Examples of LdapName


Examples of com.sun.jndi.ldap.LdapName

    return ldif.toString();
  }

  public Name asJndiName() {
    try {
      LdapName name = null;
      for (LdapDNComponent component : components) {
        String encoded = component.attributeName + "=" + escapeForJndi(component.value);
        if (name == null) {
          name = new LdapName(encoded);
        } else {
          name.add(0, encoded);
        }
      }
      return name;
    } catch (InvalidNameException e) {
      throw new IllegalStateException("Unexpected invalid name: " + this, e);
View Full Code Here

Examples of javax.naming.ldap.LdapName

        ServerLdapContext ctx = null;
        try
        {
            CoreSession session = service.getSession( principalDn, credential );
            ctx = new ServerLdapContext( service, session, new LdapName( providerUrl ) );
        }
        catch ( Exception e )
        {
            JndiUtils.wrap( e );
        }
View Full Code Here

Examples of javax.naming.ldap.LdapName

        }
        else
        {
            try
            {
                LdapName ln = new LdapName(dn);
                for(Rdn rdn : ln.getRdns())
                {
                    if("CN".equalsIgnoreCase(rdn.getType()))
                    {
                        cnStr = rdn.getValue().toString();
                    }
View Full Code Here

Examples of javax.naming.ldap.LdapName

    }

    private String getCn(X509Certificate cert) {
        String dn = getDn(cert);
        try {
            List<Rdn> rdns = new LdapName(dn).getRdns();
            for (int i = rdns.size() - 1; i >= 0; i--) {
                Rdn rdn = rdns.get(i);
                if (rdn.getType().equalsIgnoreCase("CN")) {
                    String cn = rdn.getValue().toString();
                    LOGGER.debug("certificate CN is [%s]", cn);
View Full Code Here

Examples of javax.naming.ldap.LdapName

        ServerLdapContext ctx = null;
        try
        {
            CoreSession session = service.getSession( principalDn, credential );
            ctx = new ServerLdapContext( service, session, new LdapName( providerUrl ) );
        }
        catch ( Exception e )
        {
            JndiUtils.wrap( e );
        }
View Full Code Here

Examples of javax.naming.ldap.LdapName

    /**
     * @see javax.naming.Context#createSubcontext(java.lang.String)
     */
    public Context createSubcontext( String name ) throws NamingException
    {
        return createSubcontext( new LdapName( name ) );
    }
View Full Code Here

Examples of javax.naming.ldap.LdapName

    /**
     * @see javax.naming.Context#destroySubcontext(java.lang.String)
     */
    public void destroySubcontext( String name ) throws NamingException
    {
        destroySubcontext( new LdapName( name ) );
    }
View Full Code Here

Examples of javax.naming.ldap.LdapName

    /**
     * @see javax.naming.Context#bind(java.lang.String, java.lang.Object)
     */
    public void bind( String name, Object obj ) throws NamingException
    {
        bind( new LdapName( name ), obj );
    }
View Full Code Here

Examples of javax.naming.ldap.LdapName

    /**
     * @see javax.naming.Context#rename(java.lang.String, java.lang.String)
     */
    public void rename( String oldName, String newName ) throws NamingException
    {
        rename( new LdapName( oldName ), new LdapName( newName ) );
    }
View Full Code Here

Examples of javax.naming.ldap.LdapName

    /**
     * @see javax.naming.Context#rebind(java.lang.String, java.lang.Object)
     */
    public void rebind( String name, Object obj ) throws NamingException
    {
        rebind( new LdapName( name ), obj );
    }
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.