How to redirect to a page dynamically after authentication Apex

October 11 0
Advertisement
We have developed an application and the application id is 333.
we have developed a login screen(page No. 111).
After login Company page (Page No.1) will appear where the user selects the company name.
Once company is selected, the control goes to Menu Page(Page No.10). The menu will be displayed based on the user rights.
In shared Components - Authentication scheme,
     In session Not Valid region, URL option is selected and URL is assigned as "we have given "f?p=&APP_ID.:111:&SESSION."
     In Logout URL, URL option is enabled and URL is assigned as "f?p=&APP_ID.:111"
In shared Components - Security Attributes,
     In Authentication region, in HOME link "f?p=&APP_ID.:1:&SESSION." is assigned
In login page (Page No. 111), we have created a process "On Submit - After computation and validations".
     in that
          we are checking a condition like
          if the user has access to Only one company then he will be redirected to Menu_page(Page No.10).
          if the user has access to more than one company then he will be redirected to Company Page(Page No.1).
if "No. of company access" =1 then
wwv_flow_custom_auth_std.login (p_uname => :p111_username,
p_password => :p111_password,
p_session_id => v ('APP_SESSION'),
p_flow_page => :app_id||':10'
else
wwv_flow_custom_auth_std.login (p_uname => :p111_username,
p_password => :p111_password,
p_session_id => v ('APP_SESSION'),
p_flow_page => :app_id||':1'
end if;
The above condition is not working. ie. it is always loading Company Page(Page No.1) even if the user has access to one company alone.
Can anyone point out the place where I have done wrong. Or please suggest me a method to achieve the above said task.
Advertisement
Hi User490632,
During the login,
it using the custom authentication function which I mentioned below,
*create or replace FUNCTION custom_auth_g (
p_username IN VARCHAR2,
p_password IN VARCHAR2)
RETURN BOOLEAN IS
BEGIN
FOR c1 IN (SELECT 1
FROM login_table
WHERE upper(username) = upper(p_username)
AND upper(password) = upper(p_password))
LOOP
RETURN TRUE;
END LOOP;
RETURN FALSE;
END;*
its working fine, If I give the username and password which exist in the table login_table.
Now I need to redirect to 2 different pages.
if the username is 'guru' then when he clicked the login button he has to redirect to page 2,
if username is any other name except 'guru' they have to be redirected to page 3.
Can you please give the step by step procedure to follow?
Thank you.
Regards,
gurujothi
How to redirect to a page dynamically after authentication Apex

We have developed an application and the application id is 333. we have developed a login screen(page No. 111). After login Company page (Page No.1) will appear where the user selects the company name. Once company is selected, the control goes to Me

How to redirect to different page after login in APEX 4.1

Dear All, Here my Requirement is,When the users login, when they entered their username and password and pressed login button, they have to redirected to different pages based on the type of user. Here my LOGIN_TABLE has following 3 columns, 1.Userna

How to redirect to a page dynamic

Hello everyone, I have the code bellow in public void init() of a fragment page. My problem is how to call a page in a dynamic way... if the codigoUsuario is null try{ if (getRequestBean1().getCodigoUsuario()!=null){ getTb_usuarioRowSet().setObject(1

JDev 11gR1: Force redirect to certain page upon sucessfull authentication

Hello, I am following "Enabling ADF Security in a Fusion Web Application" part of fusion developer documentation. I need to make sure that no matter which page is called, that upon successfull authentication, framework redirects user to a certai

How do I redirect to a page via a button but also populate a field on page2

I am trying to redirect to a second page via a button but at the same time populate a item on the second page from a function that returns a sequence. I tried all sort of methods, adding page processing, adding dynamic actions, adding branching and c

Adding Pages Dynamically

I want to be able to add a Page dynamically to a Book. In the Portal JavaDocs, there is a method called addPage() which is part of the following class :- com.bea.netuix.servlets.controls.page.Book Problem is, this class doesn't seem to exist ? Anyone

JSON error when trying to redirect to another page in same application

I'm trying to set up a PL/SQL dynamic action that is triggered by clicking on a button.  The dynamic action sets two values in a table and then I would like to redirect to another page.  Setting the values works fine.  The code is below: declare l_in

Session Time Out and Redirect to login page - urgent

My problem is I want to display alert message and redirect to the home page when session expires. Iam using TimeOutListener in my application as follows. public PhaseId getPhaseId() { return PhaseId.ANY_PHASE; public void beforePhase(PhaseEvent phase

Using htp.p for print dynamic data in apex region make my page slow?

Hi, everyone!!! My name is Rafael, and... I search in the web and in this forum but i can´t find a answer for my doubt. Using the procedure htp.p for print dynamic data in apex region through on demand process , this will leave my webpage slow to loa

How can I redirect to a page without having Firefox asking me to Allow it?

Whenever I am on a website and then there is a redirect to another page (e.g. a link or button etc.) Firefox prevents the AUTOMATIC redirect to a page- and I then have to click the Allow tab. Previously -- up to now-- this never happened. I would lik

How can I eliminate the toolbar that comes up every time I swith websights and says Firefox prevented this page from automatically redirecting to another page and when nothing comes up I have to hit ALLOW and most of the time it screws me up

I am running OS10 on a MAC and every time I go too another web site (most of the time) a new tool bar pops up that says " Firefox prevented this page from automatically redirecting to another page" and on the other end I must hit the button ALLO

When I click on a link in an email I get the following message at the top of the screen: "Firefox prevented this page from automatically redirecting to another page...[Allow]. How can I stop this?

When I click on a link in an email using gmail in the Mozilla brower, I get the following message at the top of the screen: "Firefox prevented this page from automatically redirecting to another page...[Allow]. How can I stop this?# Press Alt+T # Sel

How to set the number of rows per page dynamically

Hello all, i urgent need the option to set the number of rows per page dynamically. I've got a parameter. In dependence of the value of this paramter i want to set the number of rows per page of a repeating frame. The Reports Builder version i use is

AFter the latest download, my e-mail service keeps getting a bar at the top "Firefox prevented this page from automatically redirecting to another page". I have to keep hitting the "Allow" link? How do I get rid of this?

Ever since the last update, I'm having problem accessing my e-mail account. I keep getting an annoying bar at the top of the screen "Firebox prevented this page from automatically redirecting to another page." I have to keep hitting the allow bu

Is it feasible to set the rows displayed per page dynamically?

Hi, Is it feasible to set the rows displayed per page dynamically in the table view result as per the user wants eg : the user wishes to see only 25 records or all the records? Also what is the maximum limit of rows that can be fetched as per the ent

I'm getting this message: "Firefox prevented this page from automatically redirecting to another page." but unchecking the box for "warn me when websites try to redirect or reload the page" has not helped. I'm using Firefox 3.6.3 on Mac OS 10.6.3. M'aidez

Can't load Google Calendar. I'm getting this message: "Firefox prevented this page from automatically redirecting to another page" but unchecking the box for "Warn me when websites try to redirect or reload the page" has not helped. I'

How to redirect to other page in a dialogListener?

Hi All, I am using JDeveloper 11g with ADF BC. How to redirect to another page from a dialogListener of <af:dialog>? I have a page with a [Delete] button on it. When user click on the delete button, a confirmation dialog will appear to ask "Are

How to redirect a JSP page after the session is killed

Hello! I am quite new to JSP. I have a question about how to redirect a jsp page after the session is killed. Could anyone help? thanks a lot in advance!You can't, directly. There's no connection betweenthe server and browser. even after invalidating

Is there a way to submit a pdf form without redirecting my web page?

I have a fillable pdf form inside of a web page.  When a user clicks on a submit button I have the pdf calling the submitform method.  This redirects the web page to the url I specified inside of my pdf document.  I don't want the web page to be redi

Firefox 17.0.1 in Vista Home Premium, svc pak 2, experiencing Google redirects to spam pages

As referenced in a now closed thread on this site that refers to XUL Runner & XUL cache and certain registry entries as the cause. I am experiencing a very high percentage of redirects to spam pages when I use Google search in Firefox, but not IE. Ho