modulepackage
2.5.1+incompatible
Repository: https://github.com/hashicorp/ldap.git
Documentation: pkg.go.dev
# README
Basic LDAP v3 functionality for the GO programming language.
Install
For the latest version use:
go get gopkg.in/ldap.v2
Import the latest version with:
import "gopkg.in/ldap.v2"
Required Libraries:
- gopkg.in/asn1-ber.v1
Features:
- Connecting to LDAP server (non-TLS, TLS, STARTTLS)
- Binding to LDAP server
- Searching for entries
- Filter Compile / Decompile
- Paging Search Results
- Modify Requests / Responses
- Add Requests / Responses
- Delete Requests / Responses
Examples:
- search
- modify
Contributing:
Bug reports and pull requests are welcome!
Before submitting a pull request, please make sure tests and verification scripts pass:
make all
To set up a pre-push hook to run the tests and verify scripts before pushing:
ln -s ../../.githooks/pre-push .git/hooks/pre-push
The Go gopher was designed by Renee French. (http://reneefrench.blogspot.com/) The design is licensed under the Creative Commons 3.0 Attributions license. Read this article for more details: http://blog.golang.org/gopher
# Functions
CompileFilter converts a string representation of a filter into a BER-encoded packet.
DebugBinaryFile reads and prints packets from the given filename.
DecodeControl returns a control read from the given packet, or nil if no recognized control can be made.
DecompileFilter converts a packet representation of a filter into a string representation.
Dial connects to the given address on the given network using net.Dial and then returns a new Conn for the connection.
DialTLS connects to the given address on the given network using tls.Dial and then returns a new Conn for the connection.
EscapeFilter escapes from the provided LDAP filter string the special characters in the set `()*\` and those out of the range 0 < c < 0x80, as defined in RFC4515.
FindControl returns the first control of the given type in the list, or nil.
IsErrorWithCode returns true if the given error is an LDAP error with the given result code.
NewAddRequest returns an AddRequest for the given DN, with no attributes.
NewConn returns a new Conn using conn for network I/O.
NewControlBeheraPasswordPolicy returns a ControlBeheraPasswordPolicy.
NewControlManageDsaIT returns a ControlManageDsaIT control.
NewControlPaging returns a paging control.
NewControlString returns a generic control.
NewDelRequest creates a delete request for the given DN and controls.
NewEntry returns an Entry object with the specified distinguished name and attribute key-value pairs.
NewEntryAttribute returns a new EntryAttribute with the desired key-value pair.
NewError creates an LDAP error with the given code and underlying error.
NewModifyRequest creates a modify request for the given DN.
NewPasswordModifyRequest creates a new PasswordModifyRequest
According to the RFC 3602: userIdentity is a string representing the user associated with the request.
NewSearchRequest creates a new search request.
NewSimpleBindRequest returns a bind request.
ParseDN returns a distinguishedName or an error.
# Constants
Change operation choices.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
LDAP Application Codes.
Ldap Behera Password Policy Draft 10 (https://tools.ietf.org/html/draft-behera-ldap-password-policy-10).
Ldap Behera Password Policy Draft 10 (https://tools.ietf.org/html/draft-behera-ldap-password-policy-10).
Ldap Behera Password Policy Draft 10 (https://tools.ietf.org/html/draft-behera-ldap-password-policy-10).
Ldap Behera Password Policy Draft 10 (https://tools.ietf.org/html/draft-behera-ldap-password-policy-10).
Ldap Behera Password Policy Draft 10 (https://tools.ietf.org/html/draft-behera-ldap-password-policy-10).
Ldap Behera Password Policy Draft 10 (https://tools.ietf.org/html/draft-behera-ldap-password-policy-10).
Ldap Behera Password Policy Draft 10 (https://tools.ietf.org/html/draft-behera-ldap-password-policy-10).
Ldap Behera Password Policy Draft 10 (https://tools.ietf.org/html/draft-behera-ldap-password-policy-10).
Ldap Behera Password Policy Draft 10 (https://tools.ietf.org/html/draft-behera-ldap-password-policy-10).
ControlTypeBeheraPasswordPolicy - https://tools.ietf.org/html/draft-behera-ldap-password-policy-10.
ControlTypeManageDsaIT - https://tools.ietf.org/html/rfc3296.
ControlTypePaging - https://www.ietf.org/rfc/rfc2696.txt.
ControlTypeVChuPasswordMustChange - https://tools.ietf.org/html/draft-vchu-ldap-pwd-policy-00.
ControlTypeVChuPasswordWarning - https://tools.ietf.org/html/draft-vchu-ldap-pwd-policy-00.
Change operation choices.
derefAliases.
derefAliases.
derefAliases.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
Filter choices.
Filter choices.
Filter choices.
Filter choices.
Filter choices.
Filter choices.
Filter choices.
Filter choices.
Filter choices.
Filter choices.
SubstringFilter options.
SubstringFilter options.
SubstringFilter options.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
LDAP Result Codes.
MatchingRuleAssertion choices.
MatchingRuleAssertion choices.
MatchingRuleAssertion choices.
MatchingRuleAssertion choices.
MessageFinish indicates the client considers a particular message ID to be finished.
MessageQuit causes the processMessages loop to exit.
MessageRequest sends a request to the server.
MessageResponse receives a response from the server.
MessageTimeout indicates the client-specified timeout for a particular message ID has been reached.
derefAliases.
Change operation choices.
scope choices.
scope choices.
scope choices.
# Variables
ApplicationMap contains human readable descriptions of LDAP Application Codes.
BeheraPasswordPolicyErrorMap contains human readable descriptions of Behera Password Policy error codes.
ControlTypeMap maps controls to text descriptions.
DefaultTimeout is a package-level variable that sets the timeout value used for the Dial and DialTLS methods.
DerefMap contains human readable descriptions of derefAliases choices.
FilterMap contains human readable descriptions of Filter choices.
FilterSubstringsMap contains human readable descriptions of SubstringFilter choices.
LDAPResultCodeMap contains string descriptions for LDAP error codes.
MatchingRuleAssertionMap contains human readable descriptions of MatchingRuleAssertion choices.
ScopeMap contains human readable descriptions of scope choices.
# Structs
AddRequest represents an LDAP AddRequest operation.
Attribute represents an LDAP attribute.
AttributeTypeAndValue represents an attributeTypeAndValue from https://tools.ietf.org/html/rfc4514.
Conn represents an LDAP Connection.
ControlBeheraPasswordPolicy implements the control described in https://tools.ietf.org/html/draft-behera-ldap-password-policy-10.
ControlManageDsaIT implements the control described in https://tools.ietf.org/html/rfc3296.
ControlPaging implements the paging control described in https://www.ietf.org/rfc/rfc2696.txt.
ControlString implements the Control interface for simple controls.
ControlVChuPasswordMustChange implements the control described in https://tools.ietf.org/html/draft-vchu-ldap-pwd-policy-00.
ControlVChuPasswordWarning implements the control described in https://tools.ietf.org/html/draft-vchu-ldap-pwd-policy-00.
DelRequest implements an LDAP deletion request.
DN represents a distinguishedName from https://tools.ietf.org/html/rfc4514.
Entry represents a single search result entry.
EntryAttribute holds a single attribute.
Error holds LDAP error information.
ModifyRequest as defined in https://tools.ietf.org/html/rfc4511.
PacketResponse contains the packet or error encountered reading a response.
PartialAttribute for a ModifyRequest as defined in https://tools.ietf.org/html/rfc4511.
PasswordModifyRequest implements the Password Modify Extended Operation as defined in https://www.ietf.org/rfc/rfc3062.txt.
PasswordModifyResult holds the server response to a PasswordModifyRequest.
RelativeDN represents a relativeDistinguishedName from https://tools.ietf.org/html/rfc4514.
SearchRequest represents a search request to send to the server.
SearchResult holds the server's response to a search request.
SimpleBindRequest represents a username/password bind operation.
SimpleBindResult contains the response from the server.