asp.net mvc - SQL defined user authentication and MVC.net -
i work on project has predefined users inside oracle database. job write api (using c#.net mvc) on huge database. best practice user authentication in project? prefer in middle wares.
currently don't know how find out users credentials , think it's impossible select them c# side, every time user request try make connection it's (user/password)input , if had no problem close , connect oracle admin credential, cause may have not in access of db-user (most of them have view access only)
edit: wanted use mvc features (idk call) let "pattern" think impossible now. decided use 2 connection strings, 1 managing(with supervisor auth) , other user needs , let db manage permissions.
if user credentials defined in oracle database place perform authentication - not in middle-ware.
typically have database authentication function this:
function authenticate_user (p_username varchar2, p_password varchar2) return boolean;
when need authenticate user, call function; if returns true authenticated, else not. of course depending on needs function might take in different parameters, or might return 1/0 rather boolean, principle same.
Comments
Post a Comment