Custom User Authorization Scheme In Oracle Apex. Part-1

Create Custom User Authorization Scheme In Oracle Apex. Part-1

Create Custom User Authorization Scheme In Oracle Apex.
Part-1

 

Custom User Authorization Scheme I Have Tried To Show Through A Few Episodes For The Sake Of Simplicity And Explanation. Hopefully, If You Follow All The Videos And Posts, You Will Get User Authorization.

I Have Received Many Comments On My Previous Video And Post On Custom User Authorization Scheme. Many Users Could Not Access My User Authorization Process And SQL Codes. I Personally Reviewed My Previously Used SQL Code And Found That The Process Was Incomplete. Here Are Some Videos And Posts Related To User Authorization On How To Use / Create Custom User Authorization Scheme More Easily And Beautifully. I Apologize To Anyone Who Has Read My Previous Videos And Posts. Hopefully, After Watching And Reviewing This Video And Post, You Will Not Have To Face Any Problem Related To Custom User Authorization, Thank You.

Steps On How To Create Custom User Authentication Schemes In Oracle Apex. Part 1

Follow All The SQL Codes And Steps Below Correctly. In Today's Post I Will Discuss Creating New Tables, Creating New Applications And Creating Reports And Forms.

1. Create All Table ................ 
CREATE TABLE  "MY_USERS" 
       (	"USER_ID" NUMBER, 
        "USERNAME" VARCHAR2(50), 
        "FULL_NAME" VARCHAR2(100), 
        "PHONE_NUMBER" NUMBER(11,0), 
        "EMAIL_ADDRESS" VARCHAR2(50), 
        "IMAGE" BLOB, 
        "USER_TYPE" VARCHAR2(250), 
        "IS_ACTIVE" VARCHAR2(10), 
        "PASSWORD" VARCHAR2(50), 
        "PIN" VARCHAR2(4000), 
        "FILENAME" VARCHAR2(255), 
        "LAST_UPDATED" DATE, 
        "ADDED_DATE" DATE, 
        "UPDATE_DATE" DATE, 
        "MIME_TYPE" VARCHAR2(4000), 
         CONSTRAINT "MY_USERS_PK" PRIMARY KEY ("USER_ID")
      USING INDEX  ENABLE
       )
    /
    
    CREATE TABLE  "USER_GROUP" 
       (	"OID" NUMBER, 
        "PID_PARENT" NUMBER, 
        "GROUP_TITLE" NVARCHAR2(30), 
        "GROUP_DESCRIPTION" NVARCHAR2(250), 
        "IS_ACTIVE" NVARCHAR2(1), 
        "Create_By" VARCHAR2(200), 
        "Create_Date" DATE, 
        "Update By" VARCHAR2(200), 
        "UPDATE_DATE" DATE, 
         CONSTRAINT "ACL_GROUP_PK" PRIMARY KEY ("OID")
      USING INDEX  ENABLE
       )  ENABLE ROW MOVEMENT
    /
    
    
    CREATE TABLE  "IS_ACTIVATE" 
       (	"OID" NUMBER, 
        "STATUS" VARCHAR2(30), 
         CONSTRAINT "IS_ACTIVATE_PK" PRIMARY KEY ("OID")
      USING INDEX  ENABLE
       )  ENABLE ROW MOVEMENT
    /
2. Create a Sequence. 
CREATE SEQUENCE   "MY_USERS_SEQ"  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 741 CACHE 20 NOORDER  NOCYCLE  NOKEEP  NOSCALE  GLOBAL
    /
3. Create a Trigger. 
CREATE OR REPLACE TRIGGER "BI_MY_USERS"
        BEFORE INSERT
        ON "MY_USERS"
        FOR EACH ROW
    BEGIN
        IF :NEW."USER_ID" IS NULL
        THEN
            SELECT "MY_USERS_SEQ".NEXTVAL INTO :NEW."USER_ID" FROM sys.DUAL;
        END IF;
    END;
    
    
    ALTER TRIGGER "BI_MY_USERS"
        ENABLE
    /
4. When We Have Finished Creating All Our Tables, We Will Create A New Application,
        Name- User Authorization
5. Click The Create Application Button. 
6. Once The Application Is Created We Will Create A Report And Form Using The User Table. 

In Today's Video / Post, I Have Just Discussed Custom User Authorization. In My Next Video / Post I Will Discuss How To Create And Save Hess Password For Custom User Authorization, How To Use Full SQL Code Including User Authorization Package Creation.

The URL For The Next Video And Blog Post Will Be In The Video Description Box And Below.

 

🔗 Demo Application-
            URL- Demo Application
            Username - demo, Pass- demo
 

I hope everyone will like it. Please watch the full video,
Comment on any of your problems, I will try my best to solve the problem, In-Shah Allah. Everyone's cooperation is desirable. Visit my blog site, new technology related videos, you will get different types of tutorials of Oracle Apex, and hopefully, you can use them in your daily work.
Please stay tuned by subscribing to the YouTube channel, and encourages new videos to be uploaded.
=================
Visit my site to get more collaborative posts about Oracle Apex and subscribe to my YouTube channel. Thanks.
Comment on any of your issues, I will try my best to solve the problem, In-Shah Allah. Everyone's cooperation is desirable.
Visit my blog site, new technology-related videos, you will get different types of tutorials of Oracle Apex, and hopefully, you can use them in your daily work.
==============================

🙍🏾‍ Md jABER HOSSEN
📲 Mobile- +8801760688286
📨 Email- jaberit786@gmail.com
🌐 FB- facebook.com/mdjaber.hossen1
Please Subscribe to My Channel

Many thanks for visiting the site.

Then Enjoy.........................

CREATE TABLE  "MY_USERS" 
   (	"USER_ID" NUMBER, 
	"USERNAME" VARCHAR2(50), 
	"FULL_NAME" VARCHAR2(100), 
	"PHONE_NUMBER" NUMBER, 
	"EMAIL_ADDRESS" VARCHAR2(50), 
	"IMAGE" BLOB, 
	"USER_TYPE" VARCHAR2(250), 
	"SHOP_CATEGORY" VARCHAR2(100), 
	"IS_ACTIVE" VARCHAR2(10), 
	"PASSWORD" VARCHAR2(50), 
	"CREATE_BY" VARCHAR2(50), 
	"ADDED_DATE" DATE, 
	"UPDATE_DATE" DATE, 
	"MIME_TYPE" VARCHAR2(250), 
	"PIN" VARCHAR2(4000), 
	"UPDATE_BY" VARCHAR2(250), 
	"PASSWORD_RECOVERY_CODE" VARCHAR2(150), 
	"FORGOT_PASSWORD_USE" VARCHAR2(150), 
	"WRONG_PASS_ALLOW" NUMBER, 
	"UNLOCK_TIME" DATE, 
	"PP_URL" VARCHAR2(4000), 
	"PID_EMPLOYEE" NUMBER, 
	"GENDER" VARCHAR2(255), 
	 CONSTRAINT "MY_USERS_PK" PRIMARY KEY ("USER_ID")
  USING INDEX  ENABLE, 
	 CONSTRAINT "MY_USERNAME_CON" UNIQUE ("USERNAME")
  USING INDEX  ENABLE
   )
/


CREATE OR REPLACE EDITIONABLE TRIGGER  "BI_MY_USERS" 
    BEFORE INSERT
    ON "MY_USERS"
    FOR EACH ROW
BEGIN
    IF :NEW."USER_ID" IS NULL
    THEN
        SELECT "MY_USERS_SEQ".NEXTVAL INTO :NEW."USER_ID" FROM sys.DUAL;
    END IF;
END;

/
ALTER TRIGGER  "BI_MY_USERS" ENABLE
/

CREATE OR REPLACE EDITIONABLE TRIGGER  "PIN_MY_USER" 
    BEFORE INSERT OR UPDATE OF PASSWORD
    ON MY_USERS
    REFERENCING NEW AS New OLD AS Old
    FOR EACH ROW
DECLARE
BEGIN
    :new.PIN := USER_AUTH.CUSTOM_HASH (:new.USER_ID, :new.PASSWORD);

    IF INSERTING
    THEN
        :NEW.ADDED_DATE := SYSDATE;
    ELSIF UPDATING
    THEN
        :NEW.UPDATE_DATE := SYSDATE;
    END IF;
EXCEPTION
    WHEN OTHERS
    THEN
        RAISE;
END;
/
ALTER TRIGGER  "PIN_MY_USER" ENABLE
/

CREATE OR REPLACE EDITIONABLE TRIGGER  "USER_TABLE_DETELS" 
  before insert or update on MY_USERS 
  for each row 
begin 
  if inserting then 
    :new.ADDED_DATE := localtimestamp; 
    :new.CREATE_BY := nvl(sys_context('APEX$SESSION','APP_USER'),user); 
  end if; 
  :new.UPDATE_DATE := localtimestamp; 
  :new.UPDATE_BY := nvl(sys_context('APEX$SESSION','APP_USER'),user); 
end USER_TABLE_DETELS;

/
ALTER TRIGGER  "USER_TABLE_DETELS" ENABLE
/

2 Comments

Hlo Sir

Previous Post Next Post