This function checks if the user is not authenticated in the session. A FALSE is returned if the user is already logged on or TRUE if the user of the current session is not yet authenticated.
APEX_AUTHENTICATION.IS_PUBLIC_USER return BOLLEAN;
In this example,
IS_PUBLIC_USER is used to show a notification if the user has not already logged in or the username if the user has not.
if apex_authentication.is_public_user then sys.htp.p('Please sign in'); else sys.htp.p(apex_escape.html(:APP_USER)||', you are known to the system'); end if;