This content has been marked as final. Show 12 replies
979155 wrote:What do you mean by logout ? exit from the application or re open the login screen.. ?
I want to create authentification interface contains two items and 1button.
I started by creating table "Autentification" which contains 2 columns.
when-button pressed trigger:
select user_name into v1,pass into v2 from authetification where pass=:auth.pass
if v1 != NULL and v2 != NULL then
message('pass or user is false');
How I can to manage the "logout" for the user ?
If re-open the login screen, try
Hope this helps
979155 wrote:Simple is...
is that preferably create users using create user ... or create a table like I did?
Create A TABLE with few column like. user_name,user_password,user_first_name,user_last_name.
base on the table create a form and enter user information.
when login check the user entered data with the table and authentication.
Hope this helps..
On the block for "authentication" table create a pre-insert trigger and add this code
change these properties of txt_password
if :authentication.txt_password is null then select round(dbms_random.value(222222,999999)) into :authentication.txt_password from dual; end if;
Insert Allowed No
Update Allowed No
This will auto generate a six digit random number ranging from 222222 to 999999 you can embed random alphabets also
if you want do so just google this function dbms_random.value.
You can use the same logic in a trigger before insert on each row on table authentication if you dont want to create users by a form
in this case I can use "pass_words" as a primary key?If the resulting index can be created (http://ora-01404.ora-code.com/) you could, but why would you do that? The key is the username, not the password. Also it seems that you are storing the passwords in plain text in your table which in itself is a very bad idea.
Better store hashes of passwords you can do this with dbms_crypto:
Maybe also add a secret salt so you are not prone to attacks over rainbow tables:
instead numbers you can generate strings with dbms_random as well:
in this case I can use "pass_words" as a primary key?
Simple is better. Think you are not developing a public application where any one can create user name and password will auto generate and mail to the newly registered user.
create user name and password manually and inform the user what is, his password and user name.
and to your question password should not be primary key. User name should be.
Hope this helps