I’ve a front-end utility, that has a login web page. The consumer information are from an exterior database.
The applying is JOSSO2, and the element used to retrieve the information from and exterior database known as “RDBMS Id Supply”.
There are Three tabs throughout the “Create DB Id Supply” Window : Connection, Person Lookup and Password Replace.
Within the Connection Tab, I’ve to refill the sections Driver, Connection URL, Username, Password, and Retype Password.
Within the Person Lookup and Password Replace sections, there are SQL statements to fill as much as retrieve the information wanted from the database. The queries are already current in every part; nevertheless they have to be modified to customise to every particular person’s want.
Within the Person Lookup tab, these are four totally different queries and their matching SQL statements :
Person Question : SELECT LOGIN AS NAME FROM JOSSO_USER WHERE LOGIN = ?
Roles Question : SELECT NAME AS ROLE FROM JOSSO_USER_ROLE WHERE LOGIN = ?
Credentials Question : SELECT LOGIN AS USERNAME, PASSWORD FROM JOSSO_USER WHERE LOGIN = ?
Properties Question : SELECT NAME, VALUE FROM JOSSO_USER_PROPERTY WHERE LOGIN = ?
Within the Password Replace tab, there are 2 totally different queries and their matching SQL statements :
Credentials Replace : UPDATE JOSSO_USER SET PASSWORD = ? WHERE LOGIN = ?
Relay Credentials : SELECT LOGIN FROM JOSSO_USER WHERE #?# = ?
Credentials Replace is an SQL replace assertion for altering consumer credentials.
Relay Credentials is an SQL replace assertion for updating the credentials backing Bear in mind Me performance.
Now to the exterior database itself. The DB identify is paybills, and the desk identify with the consumer information is “myeg_users”. Inside this desk, the necessary columns which can be associated to the SQL queries above embrace username, first_name, last_name, nric, function, and password.
The desk construction :
paybills=# d myeg_users Desk "public.myeg_users" Column | Sort | Modifiers --------------------+-----------------------------+------------------------------------- username | character various(100) | not null password | character various(40) | e mail | character various(100) | maiden | character various(30) | first_name | character various(100) | last_name | character various(100) | gender | character various(6) | nric | character various(14) | passport_no | character various(12) | dob | date | address1 | character various(80) | address2 | character various(80) | address3 | character various(80) | metropolis | character various(60) | state | character various(50) | nation | character various(35) | postcode | character various(5) | mobile_no | character various(13) | fax_no | character various(13) | phone_no | character various(13) | marital_status | character various(12) | occupation | character various(35) | trade | character various(35) | rec_created_date | timestamp with time zone | status_flg | character various(3) | activation_id | character various(100) | last_logintime | timestamp with time zone | function | character various(255) | default 'function 2'::character various issync | character(1) | default 0 updatedsyncdated | timestamp(0) with time zone | flg_confirm_detail | character various(2) | default 'N'::character various pdpa | character various | default 'X'::character various encr_password | character various(255) | is_active | boolean | encr_date | timestamp with time zone | is_encr | character various(3) | default 'N'::character various new_user_flag | character various(3) | valid_email_flag | character various(3) | email_sent_flag | timestamp with time zone | email_hash | textual content | upgrade_flag | character(1) | default NULL::bpchar Indexes: "index_activationid" btree (activation_id) "index_myegusers_username" btree (username) paybills=#
Now I need assistance on easy methods to create queries throughout the sql queries above to retrieve data wanted from the exterior db. I attempted a couple of methods, like altering the queries above to instantly use “myeg_users” as a substitute of the already accessible JOSSO_USER, nevertheless it doesn’t work, Eg like this :
choose login as username from myeg_users the place login = ?
Please assist me add/edit the default SQL queries above to efficiently login to the web page. As of now, the error is
Invalid Authentication Info
when I attempt to login.