Monday, May 31, 2010

Custom Jazn Login

There is always requirement in SOA 10g like how to generate custom login page using Jazn Authentication. Here I am giving simple steps how to configure Jazn Authentication in 3 steps. You can download sample Jsp code in the attachment.

Step 1: Database Configuration

A. Log into your oracle database as user SCOTT.

B. create table USER_AUTH ( userid varchar(16), password varchar(16), first_name varchar(64),
last_name varchar(64), update_perm integer default 0,delete_perm integer default 0);
C. Insert data
Ex: insert into user_auth values ('govinda','govinda','Govinda','Raja', 1, 0);

Step 2: system-jazn-data.xml Configuration:

Add the following to system-jazn-data.xml in  $OC4J_HOME/config directory:






Note : The value that appear in tag is the login module name referred to in JSP code as

LoginContext lc = new LoginContext("Example", cbh);

Step 3:

A. Restart oc4j container so that the changes to jazn-data.xml is picked up

B. Run the JSP page http://:/ LoginTest

C. Enter Userid & password in the form & press submit

No comments:

Post a Comment