You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is usual for a web app, specifically on IBM i, to authenticate against user profiles on their IBM i.
Most IBM i shops don't have a typical users table with encrypted password columns.
There is no particular easy way to authenticate users for your apps. You can use a combination of operating system functions to get this to work.
This method consists of two pieces:
An ILE RPGLE program which calls QSYGETPH to authenticate a user by name and password combination
An SQL stored procedure to call the program.
They both return a char(1) output parameter which indicates whether the user and password combination is valid. You may want to increase the password length column.
The reason we want the stored procedure is so we can authenticate users from anywhere - for example, a PHP, Python or Node.js web app.
If you have any suggestions for improvements to these snippets, please feel free to share them!
create or replace procedure SCHEMA.USER_AUTHENTICATE (IN username Char(10), IN password Char(32), OUT result Char(1))
LANGUAGE RPGLE
EXTERNAL NAME SCHEMA.AUTH GENERAL;
The text was updated successfully, but these errors were encountered:
Thanks for this excellent tip. I am working in a modernization project and this will certainly be our login validation. Question here is if you have anything similar we could use for changing the password. Thanks for your help.
It is usual for a web app, specifically on IBM i, to authenticate against user profiles on their IBM i.
Most IBM i shops don't have a typical users table with encrypted password columns.
There is no particular easy way to authenticate users for your apps. You can use a combination of operating system functions to get this to work.
This method consists of two pieces:
They both return a
char(1)
output parameter which indicates whether the user and password combination is valid. You may want to increase the password length column.The reason we want the stored procedure is so we can authenticate users from anywhere - for example, a PHP, Python or Node.js web app.
If you have any suggestions for improvements to these snippets, please feel free to share them!
ILE RPG Program
SQL procedure
The text was updated successfully, but these errors were encountered: