Home > APEX_LDAP > AUTHENTICATE Function
Previous |
Next |
The AUTHENTICATE
function returns a boolean true if the user name and password can be used to perform a SIMPLE_BIND_S
, call using the provided search base, host, and port.
Syntax
APEX_LDAP.AUTHENTICATE( p_username IN VARCHAR2 DEFAULT NULL, p_password IN VARCHAR2 DEFAULT NULL, p_search_base IN VARCHAR2, p_host IN VARCHAR2, p_port IN VARCHAR2 DEFAULT 389) RETURN BOOLEAN;
Parameters
Table: AUTHENTICATE Parameters describes the parameters available in the AUTHENTICATE
function.
AUTHENTICATE Parameters
Parameter | Description |
---|---|
|
Login name of the user. |
|
Password for |
|
LDAP search base, for example, |
|
LDAP server host name. |
|
LDAP server port number. |
Example
The following example demostrates how to use the APEX_LDAP.AUTHENTICATE
function to verify user credentials against an LDAP Server.
IF APEX_LDAP.AUTHENTICATE( p_username =>'firstname.lastname', p_password =>'abcdef', p_search_base => 'cn=user,l=amer,dc=my_company,dc=com', p_host => 'our_ldap_sever.my_company.com', p_port => 389) THEN dbms_output.put_line('authenticated'); ELSE dbms_output.put_line('authentication failed'); END IF;