10.17 SEND_LOGIN_USERNAME_COOKIE Procedure
This procedure sends a cookie with the username.
Syntax
APEX_AUTHENTICATION.SEND_LOGIN_USERNAME_COOKIE (
p_username IN VARCHAR2,
p_cookie_name IN VARCHAR2 DEFAULT c_default_username_cookie,
p_consent IN BOOLEAN DEFAULT FALSE )
Parameters
Parameters | Description |
---|---|
p_username |
The user's name. |
p_cookie_name |
The cookie name which stores p_username in the browser.
|
p_consent |
Control if the cookie should actually be sent. If true , assume the user gave consent to send the cookie. If false , do not send the cookie. If there is no consent and the cookie already exists, the procedure overwrites the existing cookie value with null. This parameter is ignored and no cookie gets sent if PERSISTENT_COOKIES_ENABLED returns false .
|
Example
The example code below could be from a page submit process on a login page, which saves the username in a cookie when consent is given. P101_REMEMBER_USERNAME
could be a switch. On rendering, it could be set to Y
when the cookie has a value.
apex_authentication.send_login_username_cookie (
p_username => :P101_USERNAME,
p_consent => :P101_REMEMBER_USERNAME = 'Y' );
Parent topic: APEX_AUTHENTICATION