eldapCopyright2012-2021EricssonAB.
AllRightsReserved.
eldap1.
2.
9March23,2021Copyright2012-2021EricssonAB.
AllRightsReserved.
LicensedundertheApacheLicense,Version2.
0(the"License");youmaynotusethisfileexceptincompliancewiththeLicense.
YoumayobtainacopyoftheLicenseathttp://www.
apache.
org/licenses/LICENSE-2.
0Unlessrequiredbyapplicablelaworagreedtoinwriting,softwaredistributedundertheLicenseisdistributedonan"ASIS"BASIS,WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied.
SeetheLicenseforthespecificlanguagegoverningpermissionsandlimitationsundertheLicense.
EricssonAB.
AllRightsReserved.
.
March23,20211EldapUser'sGuideTheEldapapplicationprovidesanapiforaccessinganLDAPserver.
TheoriginalcodewasdevelopedbyTorbjrnTrnkvist.
EricssonAB.
AllRightsReserved.
:eldap|12ReferenceManualTheEldapapplicationprovidesanapiforaccessinganLDAPserver.
TheoriginalcodewasdevelopedbyTorbjrnTrnkvist.
2|EricssonAB.
AllRightsReserved.
:eldapeldapeldapErlangmoduleThismoduleprovidesaclientapitotheLightweightDirectoryAccessProtocol(LDAP).
References:RFC4510-RFC4519RFC2830TheabovepublicationscanbefoundatIETF.
DATATYPESTypedefinitionsthatareusedmorethanonceinthismodule:handle()Connectionhandleattribute()={Type=string(),Values=[string()]}modify_op()Seemod_add/2,mod_delete/2,mod_replace/2scope()SeebaseObject/0,singleLevel/0,wholeSubtree/0dereference()SeeneverDerefAliases/0,derefInSearching/0,derefFindingBaseObj/0,derefAlways/0filter()Seepresent/1,substrings/2,equalityMatch/2,greaterOrEqual/2,lessOrEqual/2,approxMatch/2,extensibleMatch/2,'and'/1,'or'/1,'not'/1return_value()=ok|{ok,{referral,referrals()}}|{error,Error}referrals()=[Address=string()]ThecontentsofAddressisserverdependent.
Exportsopen([Host])->{ok,Handle}|{error,Reason}Types:Handle=handle()SetupaconnectiontoanLDAPserver,theHOST'saretriedinorder.
open([Host],[Option])->{ok,Handle}|{error,Reason}Types:Handle=handle()EricssonAB.
AllRightsReserved.
:eldap|3eldapOption={port,integer()}|{log,function()}|{timeout,integer()}|{ssl,boolean()}|{sslopts,list()}|{tcpopts,list()}SetupaconnectiontoanLDAPserver,theHOST'saretriedinorder.
Thelogfunctiontakesthreearguments,fun(Level,FormatString,[FormatArg])end.
Timeoutsetthemaximumtimeinmillisecondsthateachserverrequestmaytake.
AllTCPsocketoptionsareacceptedexceptactive,binary,deliver,list,modeandpacketclose(Handle)->okTypes:Handle=handle()ShutdowntheconnectionaftersendinganunbindRequesttotheserver.
Iftheconnectionistlstheconnectionwillbeclosedwithssl:close/1,otherwisewithgen_tcp:close/1.
start_tls(Handle,Options)->return_value()Sameasstart_tls(Handle,Options,infinity)start_tls(Handle,Options,Timeout)->return_value()Types:Handle=handle()Options=ssl:ssl_options()Timeout=infinity|positive_integer()UpgradetheconnectionassociatedwithHandletoatlsconnectionifpossible.
Theupgradeisdoneintwophases:firsttheserverisaskedforpermissiontoupgrade.
Second,iftherequestisacknowledged,theupgradetotlsisperformed.
Errorresponsesfromphaseonewillnotaffectthecurrentencryptionstateoftheconnection.
Thoseresponsesare:tls_already_startedTheconnectionisalreadyencrypted.
Theconnectionisnotaffected.
{response,ResponseFromServer}TheupgradewasrefusedbytheLDAPserver.
TheResponseFromServerisanatomdeliveredbyttheLDAPserverexplainedinsection2.
3ofrfc2830.
Theconnectionisnotaffected,soitisstillun-encrypted.
Errorsinthesecondphasewillhoweverendtheconnection:ErrorAnyerrorrespondedfromssl:connect/3TheTimeoutparameterisfortheactualtlsupgrade(phase2)whilethetimeoutineldap:open/2isusedfortheinitialnegotiationaboutupgrade(phase1).
simple_bind(Handle,Dn,Password)->return_value()Types:Handle=handle()Dn=string()Password=string()Authenticatetheconnectionusingsimpleauthentication.
4|EricssonAB.
AllRightsReserved.
:eldapeldapadd(Handle,Dn,[Attribute])->return_value()Types:Handle=handle()Dn=string()Attribute=attribute()Addanentry.
Theentrymustnotexist.
add(Handle,"cn=BillValentine,ou=people,o=ExampleOrg,dc=example,dc=com",[{"objectclass",["person"]},{"cn",["BillValentine"]},{"sn",["Valentine"]},{"telephoneNumber",["54555500"]}])delete(Handle,Dn)->return_value()Types:Dn=string()Deleteanentry.
delete(Handle,"cn=BillValentine,ou=people,o=ExampleOrg,dc=example,dc=com")mod_add(Type,[Value])->modify_op()Types:Type=string()Value=string()Createanaddmodificationoperation.
mod_delete(Type,[Value])->modify_op()Types:Type=string()Value=string()Createadeletemodificationoperation.
mod_replace(Type,[Value])->modify_op()Types:Type=string()Value=string()Createareplacemodificationoperation.
modify(Handle,Dn,[ModifyOp])->return_value()Types:Dn=string()ModifyOp=modify_op()Modifyanentry.
EricssonAB.
AllRightsReserved.
:eldap|5eldapmodify(Handle,"cn=BillValentine,ou=people,o=ExampleOrg,dc=example,dc=com",[eldap:mod_replace("telephoneNumber",["55555500"]),eldap:mod_add("description",["LDAPHacker"])])modify_password(Handle,Dn,NewPasswd)->return_value()|{ok,GenPasswd}Types:Dn=string()NewPasswd=string()Modifythepasswordofauser.
Seemodify_password/4.
modify_password(Handle,Dn,NewPasswd,OldPasswd)->return_value()|{ok,GenPasswd}Types:Dn=string()NewPasswd=string()OldPasswd=string()GenPasswd=string()Modifythepasswordofauser.
Dn.
Theusertomodify.
Shouldbe""ifthemodifyrequestisfortheuseroftheLDAPsession.
NewPasswd.
Thenewpasswordtoset.
Shouldbe""iftheserveristogeneratethepassword.
Inthiscase,theresultwillbe{ok,GenPasswd}.
OldPasswd.
Sometimesrequiredbyserverpolicyforausertochangetheirpassword.
Ifnotrequired,usemodify_password/3.
modify_dn(Handle,Dn,NewRDN,DeleteOldRDN,NewSupDN)->return_value()Types:Dn=string()NewRDN=string()DeleteOldRDN=boolean()NewSupDN=string()ModifytheDNofanentry.
DeleteOldRDNindicateswhetherthecurrentRDNshouldberemovedfromtheattributelistaftertheoperation.
NewSupDNisthenewparentthattheRDNshallbemovedto.
Iftheoldparentshouldremainasparent,NewSupDNshallbe"".
modify_dn(Handle,"cn=BillValentine,ou=people,o=ExampleOrg,dc=example,dc=com","cn=BillJrValentine",true,"")search(Handle,SearchOptions)->{ok,#eldap_search_result{}}|{ok,{referral,referrals()}}|{error,Reason}Types:SearchOptions=#eldap_search{}|[SearchOption]SearchOption={base,string()}|{filter,filter()}|{scope,scope()}|{attributes,[string()]}|{deref,dereference(types_only,boolean()}|{timeout,integer()}6|EricssonAB.
AllRightsReserved.
:eldapeldapSearchthedirectorywiththesuppliedtheSearchOptions.
Thebaseandfilteroptionsmustbesupplied.
Defaultvalues:scopeiswholeSubtree(),derefisderefAlways(),types_onlyisfalseandtimeoutis0(meaninginfinity).
Filter=eldap:substrings("cn",[{any,"V"}]),search(Handle,[{base,"dc=example,dc=com"},{filter,Filter},{attributes,["cn"]}]),ThetimeoutoptionintheSearchOptionsisfortheldapserver,whilethetimeoutineldap:open/2isusedforeachindividualrequestinthesearchoperation.
baseObject()->scope()Searchbaseobjectonly.
singleLevel()->scope()Searchthespecifiedlevelonly,i.
e.
donotrecurse.
wholeSubtree()->scope()Searchtheentiresubtree.
neverDerefAliases()->dereference()Neverderefrencealiases,treataliasesasentries.
derefAlways()->dereference()Alwaysderefrencealiases.
derefInSearching()->dereference()Derefrencealiasesonlywhensearching.
derefFindingBaseObj()->dereference()Derefrencealiasesonlyinfindingthebase.
present(Type)->filter()Types:Type=string()Createafilterwhichfiltersonattributetypepresence.
substrings(Type,[SubString])->filter()Types:Type=string()SubString={StringPart,string()}StringPart=initial|any|finalCreateafilterwhichfiltersonsubstrings.
equalityMatch(Type,Value)->filter()Types:Type=string()EricssonAB.
AllRightsReserved.
:eldap|7eldapValue=string()Createaequalityfilter.
greaterOrEqual(Type,Value)->filter()Types:Type=string()Value=string()Createagreaterorequalfilter.
lessOrEqual(Type,Value)->filter()Types:Type=string()Value=string()Createalessorequalfilter.
approxMatch(Type,Value)->filter()Types:Type=string()Value=string()Createaapproximationmatchfilter.
extensibleMatch(MatchValue,OptionalAttrs)->filter()Types:MatchValue=string()OptionalAttrs=[Attr]Attr={matchingRule,string()}|{type,string()}|{dnAttributes,boolean()}Createsanextensiblematchfilter.
Forexample,eldap:extensibleMatch("Bar",[{type,"sn"},{matchingRule,"caseExactMatch"}]))createsafilterwhichperformsacaseExactMatchontheattributesnandmatcheswiththevalue"Bar".
ThedefaultvalueofdnAttributesisfalse.
'and'([Filter])->filter()Types:Filter=filter()CreatesafilterwhereallFiltermustbetrue.
'or'([Filter])->filter()Types:Filter=filter()CreateafilterwhereatleastoneoftheFiltermustbetrue.
8|EricssonAB.
AllRightsReserved.
:eldapeldap'not'(Filter)->filter()Types:Filter=filter()Negateafilter.
EricssonAB.
AllRightsReserved.
:eldap|9
易探云服务器怎么过户/转让?易探云支持云服务器PUSH功能,该功能可将云服务器过户给指定用户。可带价PUSH,收到PUSH请求的用户在接收云服务器的同时,系统会扣除接收方的款项,同时扣除相关手续费,然后将款项打到发送方的账户下。易探云“PUSH服务器”的这一功能,可以让用户将闲置云服务器转让给更多需要购买的用户!易探云服务器怎么过户/PUSH?1.PUSH双方必须为认证用户:2.买家未接收前,卖家...
新网好不好?新网域名便宜吗?新网怎么样?新网是国内老牌知名域名注册商,企业正规化运营,资质齐全,与阿里云万网和腾讯云DNSPOD同为国内服务商巨头。近日新网发布了最新的七月放价季优惠活动,主要针对域名、云主机、企业邮箱、SSL证书等多款云产品推送了超值的优惠,其中.com顶级域名仅19.9元/首年,.cn域名仅16元/首年,云主机1核心2G内存3Mbps带宽仅9.9元/月,企业邮箱更是免费送1年,...
Webhosting24是一家始于2001年的意大利商家,提供的产品包括虚拟主机、VPS、独立服务器等,可选数机房包括美国洛杉矶、迈阿密、纽约、德国慕尼黑、日本、新加坡、澳大利亚悉尼等。商家VPS主机采用AMD Ryzen 9 5950X CPU,NVMe磁盘,基于KVM架构,德国机房不限制流量,网站采用欧元计费,最低年付15欧元起。这里以美国机房为例,分享几款套餐配置信息。CPU:1core内存...
ldapserver为你推荐
指示灯iphone字节跳动回应TikTok易主#北京字节跳动科技有限公司#小说审核有三面么?我面试了两轮就叫我回家等消息了 要是刷下来了也该告360免费建站搭建卡盟分站(卡乐购系统,免费360网站收录)只要29元,想建的找2208647548!课程cuteftp银花珠树晓来看晚来天欲雪,能饮一杯无。相似的句子易名网易名网交易域名是怎么收费的科创板首批名单科创板开市后,可以通过哪些基金参与科创板投资和打新股?curl扩展大神帮忙看下centos 7.2 系统 php7.0.12的 curl 扩展怎么开启,谢谢啦curl扩展linux上怎么操作开启php curl扩展400电话查询能查出400电话是什么地区的吗
电信测速器 buyvm linode日本 512av 512au 地址大全 个人空间申请 刀片服务器是什么 河南m值兑换 国外在线代理服务器 空间申请 服务器防御 酷锐 监控主机 最好的空间留言 灵动:鬼影实录3 元旦促销方案 北京摇号申请网站入口 宏讯网 永久免费网络游戏 更多