This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.Duration; | |
import java.util.*; | |
import java.util.concurrent.*; | |
import org.ldaptive.*; | |
import org.ldaptive.auth.*; | |
import org.ldaptive.pool.*; | |
import org.ldaptive.ssl.*; | |
public final class LdaptiveConcurrent | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.ldaptive.auth.AddControlAuthenticationRequestHandler; | |
import org.ldaptive.control.RequestControl; | |
import org.ldaptive.control.SessionTrackingControl; | |
public class SessionTrackingAuthenticationRequestHandler extends AddControlAuthenticationRequestHandler | |
{ | |
private final UserRequestData requestData; | |
public SessionTrackingAuthenticationRequestHandler() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.ldaptive.LdapException; | |
import org.ldaptive.auth.AuthenticationCriteria; | |
import org.ldaptive.auth.AuthenticationHandler; | |
import org.ldaptive.auth.AuthenticationHandlerResponse; | |
/** | |
* Provides an LDAP authentication implementation that wraps the invocation of another handler and then inspects the | |
* response. If the response result is false and it contains the {@link ActiveDirectoryAccountState.Error#ACCOUNT_EXPIRED} | |
* error, then the response result is changed from false to true. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ShibSSLContextInitializer implements SSLContextInitializer { | |
@Override public SSLContext initSSLContext(String protocol) throws GeneralSecurityException { | |
final SSLContext ctx = SSLContext.getInstance(protocol); | |
ctx.init(getKeyManagers(), getTrustManagers(), null); | |
return ctx; | |
} | |
@Override public TrustManager[] getTrustManagers() throws GeneralSecurityException { | |
return new TrustManager[0]; // expose your trust managers here |