UNIFACE LDAP用户认证 [英] UNIFACE LDAP User authentication

查看:72
本文介绍了UNIFACE LDAP用户认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好

我们在uniface中使用LDAP来允许用户登录到我们的系统.如果用户名/密码正确,则一切正常.但是,当使用无效密码时,我们得到的只是错误代码49. 是否有可能获得更有意义的错误消息.诸如:用户名/密码不正确 密码已过期 或者 用户名已被禁用.

we use LDAP within uniface to allow users to login to our system. When the username/password is correct, all is fine. But when an invalid password is used all we get is error code 49. Is it possible to get a more meaningful error message. Something like: username/password is incorrect Password has expired or username has been disabled.

我的代码是:

;-----------------------------------------------------------------------
; Initialise an ldap session (using PRIMARY DOMAIN CONTROLLER details)
; Get handle back to the session for use by subsequent calls
;-----------------------------------------------------------------------
activate "LDAP".LDAP_SSLINIT(v_handle,v_p_svr,v_p_port,v_ssl)
if($status != 0)        ;Failed 
    return(0)
endif

then

;---------------------------------------------------------
; Perform a BIND to the LDAP (thereby authenticating user)
;---------------------------------------------------------
activate "LDAP".LDAP_BIND_S(v_handle,v_dn,v_cred,v_method)

Uniface有点奇怪,但我认为对ldap的调用应该与Java中的调用相同.

Uniface is a bit odd but I think the calls to ldap should be the same as in say Java.

推荐答案

摘自RFC4511,附录A.2( https://tools.ietf.org/html/rfc4511#appendix-A.2 ),这意味着

From the RFC4511, Appendix A.2 (https://tools.ietf.org/html/rfc4511#appendix-A.2) this means

invalidCredentials (49)
Indicates that the provided credentials (e.g., the user's name and password) are invalid.

RFC4511定义了这些标准错误代码.

The RFC4511 defines these standard error codes.

根据您的特定LDAP服务器,它可能会返回其他(非标准)错误代码(例如Oracle OID:

Depending on your specific LDAP server it may return additional (non-standard) error codes (like for example the Oracle OID: http://docs.oracle.com/cd/B28196_01/idmanage.1014/b15991/trblsht.htm#CHDFJBIG)

这篇关于UNIFACE LDAP用户认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆