admin管理员组文章数量:1405501
Am trying to authenticate my Oracle APEX app with LDAP using custom Authentication Scheme.
Here is my function and get error ORA-06550 apex_authenticate_ldap must be type. Appreciate any advice.
create or replace FUNCTION apex_authenticate_ldap (
p_username IN VARCHAR2,
p_password IN VARCHAR2
) RETURN BOOLEAN
IS
l_ldap_host VARCHAR2(100) := 'corp.mydomain';
l_ldap_port NUMBER := 389;
l_base_dn VARCHAR2(200) := 'OU=Vendors,OU=Service and Support,DC=corp,DC=mydomain,DC=com';
l_ldap_conn DBMS_LDAP.session;
l_result PLS_INTEGER;
BEGIN
-- Initialize LDAP session
l_ldap_conn := DBMS_LDAP.init(l_ldap_host, l_ldap_port);
-- Attempt to bind (authenticate) user
l_result := DBMS_LDAP.simple_bind_s(
l_ldap_conn,
'CN=' || p_username || ',' || l_base_dn,
p_password
);
-- Close LDAP session
--DBMS_LDAP.unbind_s(l_ldap_conn);
-- If authentication is successful, return TRUE
RETURN TRUE;
EXCEPTION
WHEN OTHERS THEN
-- Ensure LDAP session is closed in case of errors
RETURN FALSE; -- Return FALSE if authentication fails
END apex_authenticate_ldap;
/```
I have very limited experience with Oracle APEX.
[1]: .png
本文标签: ldapOrace APEX Custom authenticationStack Overflow
版权声明:本文标题:ldap - Orace APEX Custom authentication - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744888989a2630658.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论