This function checks if the user is authenticated in the session and returns TRUE if the user is already logged in or FALSE if the user of the current session is not yet authenticated.
APEX_AUTHENTICATION.IS_AUTHENTICATED RETURN BOOLEAN;
In this example,
IS_AUTHENTICATED is used to emit the username if the user has already logged in or a notification if the user has not.
if apex_authentication.is_authenticated then sys.htp.p(apex_escape.html(:APP_USER)||', you are known to the system'); else sys.htp.p('Please sign in'); end if;