Package org.apache.directory.ldap.client.api

Examples of org.apache.directory.ldap.client.api.SaslDigestMd5Request


        {
            System.out.println( "try " + i );

            // Digest-MD5
            connection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );
            SaslDigestMd5Request digetDigestMd5Request = new SaslDigestMd5Request();
            digetDigestMd5Request.setUsername( userDn.getRdn().getValue().getString() );
            digetDigestMd5Request.setCredentials( "secret" );
            digetDigestMd5Request.setRealmName( ldapServer.getSaslRealms().get( 0 ) );
            resp = connection.bind( digetDigestMd5Request );
            assertEquals( ResultCodeEnum.SUCCESS, resp.getLdapResult().getResultCode() );
            entry = connection.lookup( userDn );
            assertEquals( "hnelson", entry.get( "uid" ).getString() );
            connection.close();
View Full Code Here


                                bindResponse = ldapConnection.bind( cramMd5Request );
                            }
                            // DIGEST-MD5 Authentication
                            else if ( connection.getConnectionParameter().getAuthMethod() == ConnectionParameter.AuthenticationMethod.SASL_DIGEST_MD5 )
                            {
                                SaslDigestMd5Request digestMd5Request = new SaslDigestMd5Request();
                                digestMd5Request.setUsername( bindPrincipal );
                                digestMd5Request.setCredentials( bindPassword );
                                digestMd5Request.setRealmName( connection.getConnectionParameter().getSaslRealm() );
                                digestMd5Request.setQualityOfProtection( connection.getConnectionParameter()
                                    .getSaslQop() );
                                digestMd5Request.setSecurityStrength( connection.getConnectionParameter()
                                    .getSaslSecurityStrength() );
                                digestMd5Request.setMutualAuthentication( connection.getConnectionParameter()
                                    .isSaslMutualAuthentication() );

                                bindResponse = ldapConnection.bind( digestMd5Request );
                            }
                            // GSSAPI Authentication
View Full Code Here

                                bindResponse = ldapConnection.bind( cramMd5Request );
                            }
                            // DIGEST-MD5 Authentication
                            else if ( connection.getConnectionParameter().getAuthMethod() == ConnectionParameter.AuthenticationMethod.SASL_DIGEST_MD5 )
                            {
                                SaslDigestMd5Request digestMd5Request = new SaslDigestMd5Request();
                                digestMd5Request.setUsername( bindPrincipal );
                                digestMd5Request.setCredentials( bindPassword );
                                digestMd5Request.setRealmName( connection.getConnectionParameter().getSaslRealm() );
                                digestMd5Request.setQualityOfProtection( connection.getConnectionParameter()
                                    .getSaslQop() );
                                digestMd5Request.setSecurityStrength( connection.getConnectionParameter()
                                    .getSaslSecurityStrength() );
                                digestMd5Request.setMutualAuthentication( connection.getConnectionParameter()
                                    .isSaslMutualAuthentication() );

                                bindResponse = ldapConnection.bind( digestMd5Request );
                            }
                            // GSSAPI Authentication
View Full Code Here

TOP

Related Classes of org.apache.directory.ldap.client.api.SaslDigestMd5Request

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.