@Override public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported(); return ((LdapContext) delegating).extendedOperation(request); }
private void changePasswordUsingExtensionOperation (DistinguishedName userDn, String oldPassword, String newPassword) { template.executeReadWrite(dirCtx -> { LdapContext ctx = (LdapContext) dirCtx; String userIdentity = LdapUtils.getFullDn(userDn, ctx).encode(); PasswordModifyRequest request = new PasswordModifyRequest(userIdentity, oldPassword, newPassword); try { return ctx.extendedOperation(request); } catch (javax.naming.AuthenticationException e) { throw new BadCredentialsException( "Authentication for password change failed."); } }); }
@Override public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported(); return ((LdapContext) delegating).extendedOperation(request); }
@Override public Object operation() throws NamingException { return ((LdapContext) getDelegate()).extendedOperation(request); } }.perform();
@Override public Object operation() throws NamingException { return ((LdapContext) getDelegate()).extendedOperation(request); } }.perform();
@Override public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported(); return ((LdapContext) delegating).extendedOperation(request); }
@Override public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { if ( ! (delegating instanceof LdapContext)) throw Assert.unsupported(); return ((LdapContext) delegating).extendedOperation(request); }
public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { return getOriginal().extendedOperation(request); }
/** * @see javax.naming.ldap.LdapContext#extendedOperation(javax.naming.ldap.ExtendedRequest) */ public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { this.assertOpen(); return this.getDelegateLdapContext().extendedOperation(request); }
/** * @see LdapContext#extendedOperation(ExtendedRequest) */ public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { this.assertOpen(); return this.getDelegateLdapContext().extendedOperation(request); }
/** * @see javax.naming.ldap.LdapContext#extendedOperation(javax.naming.ldap.ExtendedRequest) */ public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { this.assertOpen(); return this.getDelegateLdapContext().extendedOperation(request); }
/** * @see LdapContext#extendedOperation(ExtendedRequest) */ public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { this.assertOpen(); return this.getDelegateLdapContext().extendedOperation(request); }
/** * @see LdapContext#extendedOperation(ExtendedRequest) */ public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { this.assertOpen(); return this.getDelegateLdapContext().extendedOperation(request); }
/** * @see javax.naming.ldap.LdapContext#extendedOperation(javax.naming.ldap.ExtendedRequest) */ public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { this.assertOpen(); return this.getDelegateLdapContext().extendedOperation(request); }
/** * @see LdapContext#extendedOperation(ExtendedRequest) */ public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { this.assertOpen(); return this.getDelegateLdapContext().extendedOperation(request); }
/** * @see javax.naming.ldap.LdapContext#extendedOperation(javax.naming.ldap.ExtendedRequest) */ public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { this.assertOpen(); return this.getDelegateLdapContext().extendedOperation(request); }
public ExtendedResponse extendedOperation(ExtendedRequest request) throws NamingException { check(); return getOriginal().extendedOperation(request); }
private void changePasswordUsingExtensionOperation (DistinguishedName userDn, String oldPassword, String newPassword) { template.executeReadWrite(dirCtx -> { LdapContext ctx = (LdapContext) dirCtx; String userIdentity = LdapUtils.getFullDn(userDn, ctx).encode(); PasswordModifyRequest request = new PasswordModifyRequest(userIdentity, oldPassword, newPassword); try { return ctx.extendedOperation(request); } catch (javax.naming.AuthenticationException e) { throw new BadCredentialsException( "Authentication for password change failed."); } }); }
/** * This will attempt the startTLS extended operation on the supplied ldap context. * * @param ctx ldap context * * @return start tls response * * @throws NamingException if an error occurs while requesting an extended operation * @throws IOException if an error occurs while negotiating TLS */ protected StartTlsResponse startTLS(final LdapContext ctx) throws NamingException, IOException { final StartTlsResponse tls = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest()); if (hostnameVerifier != null) { logger.trace("startTLS hostnameVerifier = {}", hostnameVerifier); tls.setHostnameVerifier(hostnameVerifier); } if (sslSocketFactory != null) { logger.trace("startTLS sslSocketFactory = {}", sslSocketFactory); tls.negotiate(sslSocketFactory); } else { tls.negotiate(); } return tls; }
/** * This will attempt the startTLS extended operation on the supplied ldap context. * * @param ctx ldap context * * @return start tls response * * @throws NamingException if an error occurs while requesting an extended operation * @throws IOException if an error occurs while negotiating TLS */ protected StartTlsResponse startTLS(final LdapContext ctx) throws NamingException, IOException { final StartTlsResponse tls = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest()); if (hostnameVerifier != null) { logger.trace("startTLS hostnameVerifier = {}", hostnameVerifier); tls.setHostnameVerifier(hostnameVerifier); } if (sslSocketFactory != null) { logger.trace("startTLS sslSocketFactory = {}", sslSocketFactory); tls.negotiate(sslSocketFactory); } else { tls.negotiate(); } return tls; }