--application/shared_components/security/authorization/master_page_authorization
wwv_flow_api.create_security_scheme(
  p_id => 14565830986682708 + wwv_flow_api.g_id_offset,
  p_flow_id => wwv_flow.g_flow_id,
  p_name=>'master_page_authorization',
  p_scheme_type=>'FUNCTION_RETURNING_BOOLEAN',
  p_scheme=>'IF wwv_flow_custom_auth.current_page_is_public then'||chr(10)||
'return TRUE;'||chr(10)||
'else'||chr(10)||
'return mip_security.page_authorization(p_app_user=>:app_user, p_page_id=>:app_page_id);'||chr(10)||
'END IF;',
  p_caching=>'BY_USER_BY_PAGE_VIEW',
  p_error_message=>'You are not authorized to access this page');
 
