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
spinservers怎么样?spinservers大硬盘服务器。Spinservers刚刚在美国圣何塞机房补货120台独立服务器,CPU都是双E5系列,64-512GB DDR4内存,超大SSD或NVMe存储,数量有限,机器都是预部署好的,下单即可上架,无需人工干预,有需要的朋友抓紧下单哦。Spinservers是Majestic Hosting Solutions,LLC旗下站点,主营美国独立...
华纳云怎么样?华纳云是香港老牌的IDC服务商,成立于2015年,主要提供中国香港/美国节点的服务器及网络安全产品、比如,香港服务器、香港云服务器、香港高防服务器、香港高防IP、美国云服务器、机柜出租以及云虚拟主机等。以极速 BGP 冗余网络、CN2 GIA 回国专线以及多年技能经验,帮助全球数十万家企业实现业务转型攀升。华纳云针对618返场活动,华纳云推出一系列热销产品活动,香港云服务器低至3折,...
virmach这是第二波出这种一次性周期的VPS了,只需要缴费1一次即可,用完即抛,也不允许你在后面续费。本次促销的是美国西海岸的圣何塞和美国东海岸的水牛城,周期为6个月,过后VPS会被自动且是强制性取消。需要临时玩玩的,又不想多花钱的用户,可以考虑下!官方网站:https://www.virmach.comTemporary Length Service Specials圣何塞VPS-一次性6个...
ldapserver为你推荐
企业cmscms是什么企业ssl证书国内哪些公司是专门做ssl证书的呢?360邮箱lin.long.an@360.com是什么邮箱sqlserver2000挂起安装sqlserver2000时总提示有挂起操作!360公司迁至天津360公司前身是中国吗?现总裁是谁?重庆电信dns重庆电信 路由器连接另一个电脑,本地连接的IP是多少,?DNS首选,备用 服务器是多少?补贴eset大飞资讯单仁资讯的黄功夫是何许人?什么是通配符什么是直女癌?ie假死我的ie浏览器偶尔出现假死的情况 即打开浏览器时无法显示网页 点了关闭窗口也没反应,请问这是怎么回事啊
备案未注册域名 中文域名申请 如何注册中文域名 新通用顶级域名 qq云存储 google电话 GGC tier 账号泄露 新世界电讯 密码泄露 远程登陆工具 新站长网 租空间 合租空间 网站木马检测工具 佛山高防服务器 美国堪萨斯 息壤代理 能外链的相册 更多