examples/

directory
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2026 License: MIT

Directories

Path Synopsis
Command basic authenticates one username and password with the direct-bind strategy, which needs no service account.
Command basic authenticates one username and password with the direct-bind strategy, which needs no service account.
Command cache-store implements the Cache interface, the lower-level of the two ways several replicas share one cache.
Command cache-store implements the Cache interface, the lower-level of the two ways several replicas share one cache.
Command custom-groups resolves group membership from somewhere the directory is not, and shows how to combine that with what the directory does know.
Command custom-groups resolves group membership from somewhere the directory is not, and shows how to combine that with what the directory does know.
Command custom-identity replaces the identity this package produces with the application's own user type.
Command custom-identity replaces the identity this package produces with the application's own user type.
Command escaping shows what LDAP injection looks like, what the usual fix looks like, and what this package does instead.
Command escaping shows what LDAP injection looks like, what the usual fix looks like, and what this package does instead.
Command failover shows what happens when a directory replica goes away.
Command failover shows what happens when a directory replica goes away.
Command groups shows the three ways group membership can be resolved, against whichever the directory supports.
Command groups shows the three ways group membership can be resolved, against whichever the directory supports.
Command layered shows the shape a high-traffic deployment wants, and which parts of it this library is and is not.
Command layered shows the shape a high-traffic deployment wants, and which parts of it this library is and is not.
Command lookup reads a user's attributes and groups without a password, for the case where authentication already happened somewhere else.
Command lookup reads a user's attributes and groups without a password, for the case where authentication already happened somewhere else.
Command metrics implements the Metrics interface, which is how numbers leave this package without a metrics library entering it.
Command metrics implements the Metrics interface, which is how numbers leave this package without a metrics library entering it.
Command mtls connects to a directory that authenticates the application itself with a client certificate, on top of authenticating the user with a bind.
Command mtls connects to a directory that authenticates the application itself with a client certificate, on top of authenticating the user with a bind.
Command nethttp is an HTTP server that authenticates against LDAP, using the httpauth package.
Command nethttp is an HTTP server that authenticates against LDAP, using the httpauth package.
Command reloading rotates the service account password without restarting the process.
Command reloading rotates the service account password without restarting the process.
Command sealed-cache shares a cache between replicas without trusting what is in it.
Command sealed-cache shares a cache between replicas without trusting what is in it.
Command search-then-bind authenticates with a service account: it searches for the user's entry, then verifies the password by binding as the DN the search returned.
Command search-then-bind authenticates with a service account: it searches for the user's entry, then verifies the password by binding as the DN the search returned.
Command testing runs the whole library against the in-memory directory in the ldaptest package, so you can see what a login does without having an LDAP server anywhere.
Command testing runs the whole library against the in-memory directory in the ldaptest package, so you can see what a login does without having an LDAP server anywhere.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL