Authentication - "Invalid Login Credentials" ? ? ?

Hey guys,
Need some help regarding Log in.
I have a table in the database (table name USER_SECURITY) which has the list of users who are authorized to log in to the application.
I have to incorporate this in the application page
Could you please help me with the logic how to go about it in APEX
Thank You for your help and suggestions
Jesh

Hi,
I did try the link and it helped me understand alot, [ http://djmein.blogspot.com/2007/07/custom-authentication-authorisation.html]
and I tried an example as mentioned in Duncan Mein's Blog and it did work, but then when I try to use it in my application and entered the username and password it says *"Invalid Login Credentials".*
Here's the code I used:
The table was already created in the database: ASQ_USER_SECURITY
has four columns: USER_ID, USER_ROLE, USER_NAME, PASSWORD
Created an Application Security Package
CREATE OR REPLACE PACKAGE app_security_pkg
AS
PROCEDURE add_user
p_user_id IN VARCHAR2,
p_user_role IN VARCHAR2,
p_username IN VARCHAR2,
p_password IN VARCHAR2
PROCEDURE login
p_uname IN VARCHAR2
,p_password IN VARCHAR2
,p_session_id IN VARCHAR2
,p_flow_page IN VARCHAR2
FUNCTION get_hash
p_username IN VARCHAR2
,p_password IN VARCHAR2
RETURN VARCHAR2;
PROCEDURE valid_user2
p_username IN VARCHAR2
,p_password IN VARCHAR2
FUNCTION valid_user
p_username IN VARCHAR2
,p_password IN VARCHAR2
RETURN BOOLEAN;
END app_security_pkg;
CREATE PACKAGE BODY
CREATE OR REPLACE PACKAGE BODY app_security_pkg
AS
PROCEDURE login
p_uname IN VARCHAR2
,p_password IN VARCHAR2
,p_session_id IN VARCHAR2
,p_flow_page IN VARCHAR2
IS
lv_goto_page NUMBER DEFAULT 1;
BEGIN
IF UPPER(p_uname) = 'ADMIN'
THEN
lv_goto_page := 1;
ELSE
lv_goto_page := 1;
END IF;
wwv_flow_custom_auth_std.login
p_uname => p_uname,
p_password => p_password,
p_session_id => p_session_id,
p_flow_page => p_flow_page || ':' || lv_goto_page
EXCEPTION
WHEN OTHERS
THEN
RAISE;
END login;
PROCEDURE add_user
p_user_id IN VARCHAR2,
p_user_role IN VARCHAR2,
p_username IN VARCHAR2,
p_password IN VARCHAR2
AS
BEGIN
INSERT INTO app_users (USER_ID,USER_ROLE,USER_NAME, PASSWORD)
VALUES (p_user_id,p_user_role,UPPER (p_username),
get_hash (TRIM (p_username), p_password));
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
RAISE;
END add_user;
FUNCTION get_hash (p_username IN VARCHAR2, p_password IN VARCHAR2)
RETURN VARCHAR2
AS
BEGIN
RETURN DBMS_OBFUSCATION_TOOLKIT.md5 (
input_string => UPPER (p_username)
|| '/'
|| UPPER (p_password));
END get_hash;
PROCEDURE valid_user2 (p_username IN VARCHAR2, p_password IN VARCHAR2)
AS
v_dummy VARCHAR2 (1);
BEGIN
SELECT '1'
INTO v_dummy
FROM ASQ_USER_SECURITY
WHERE UPPER (USER_NAME) = UPPER (p_username)
AND PASSWORD = get_hash (p_username, p_password);
EXCEPTION
WHEN NO_DATA_FOUND
THEN raise_application_error (-20000, 'Invalid username / password.');
END valid_user2;
FUNCTION valid_user (p_username IN VARCHAR2, p_password IN VARCHAR2)
RETURN BOOLEAN
AS
BEGIN
valid_user2 (UPPER (p_username), p_password);
RETURN TRUE;
EXCEPTION
WHEN OTHERS
THEN RETURN FALSE;
END valid_user;
END app_security_pkg;
When I tried to Create a Test User it worked and added a record in the database
exec app_security_pkg.add_user ('RS','E','jesh','goodone')
Create your own Authentication Scheme
Authentication Function Section: RETURN APP_SECURITY_PKG.valid_user
Switch on your Custom Scheme: made it “My Auth Scheme”
Also Altered the Login Process on Page 101
app_security_pkg.login (P_UNAME => :P101_USERNAME, P_PASSWORD => :P101_PASSWORD, P_SESSION_ID => v('APP_SESSION'), P_FLOW_PAGE => :APP_ID );
This is pretty much what was there in the Duncan Mein's Blog
Thank you for having a look at the code
Appreciate your help
Jesh

Similar Messages

  • EssBase: Login fails due to invalid login credentials

    I am currently running Hyperion System Planning 9, authenticating users through my LDAP server and am having a problem creating new users. I have gone through what I believe are the steps I need to take and have created my users but now when they try to login to EssBase, through the excel add-in, I get this message: "Login fails due to invalid login credentials"
    I have searched the forums and the Essbase knowledge base and have come up empty. The only thing I have found is this:
    "You just need to provision your shared services user with access to Essbase. Right-click on your user, select provision and then give them the required Essbase rights."
    I have provisioned my users several times and made sure that they are added to the correct groups but they still can't log in.
    Has anyone had this issue before?
    Thanks,
    J

    Another point that you need verify, the service sequence:
    1. Start the analytic Services
    2. Star analytic Administration services.
    regards,
    Wallace

  • Invalid login credentials when install oracle xe

    Hi friends,
    I installed oracle xe version 10.2.0.1.0 correctly, but when i tried to login to adminstration via
    http://localhost:8080/apex
    with sys or system and the password (which i have given during the /etc/init.d/oracle-xe configure)
    It says invalid login credentials
    Please Help me out
    Thanks

    Had same login credentials problem today (and pwd was spelt as it always is). No way was I getting in via frontend or SqlPlus or using any online tip.
    Deinstalled and reinstalled several times according to instructions. Note that ¨/etc/init.d/oracle-xe configure¨ doesn´t re-run unless you update ¨/etc/default/oracle-xe¨ file with ¨CONFIGURE_RUN=false¨
    Now I am into a whole host of connection problems and the database service does not start. Any ideas?
    Listener status:
    root@II-laptop1:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server# lsnrctl status
    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 22-AUG-2007 17:06:11
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    Start Date 22-AUG-2007 16:53:34
    Uptime 0 days 0 hr. 12 min. 36 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Default Service XE
    Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
    Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=II-laptop1)(PORT=1521)))
    The listener supports no services
    The command completed successfully
    Listener logfile:
    Started with pid=8156
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=II-laptop1)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    22-AUG-2007 16:23:12 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=II-laptop1)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169869568)) * status * 0
    22-AUG-2007 16:28:51 * (CONNECT_DATA=(SID=XE)(CID=(PROGRAM=sqlplus)(HOST=II-laptop1)(USER=oracle))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=59109)) * establish * XE * 12505
    TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
    22-AUG-2007 16:37:51 * ping * 0
    22-AUG-2007 16:38:16 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=II-laptop1)(USER=oracle))(COMMAND=services)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169869568)) * services * 0
    listener.ora:
    LISTENER =
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    # SID_LIST_<lsnr>
    # List of services the listener knows about and can connect
    # clients to. There is no default. See the Net8 Administrator's
    # Guide for more information.
    SID_LIST_LISTENER=
    (SID_LIST=
    (SID_DESC=
    (SID_NAME=PLSExtProc)
    (ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
    (PROGRAM = extproc)
    DEFAULT_SERVICE_LISTENER = (XE)
    tnsnames.ora:
    XE= (DESCRIPTION =
    (ADDRESS_LIST=
    (ADDRESS=
    (PROTOCOL=tcp)
    (HOST=127.0.0.1)
    (PORT=1521)))
    (CONNECT_DATA=
    (SID=XE)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    Any help would be greatly appreciated, thanks.

  • Error: 1051293: Login fails due to invalid login credentials

    Need help!
    I searched all the threads for this but i still have not found one that works for my issue.
    I was trying to add a new essbase server using EAS and i been getting the following error.
    I am able to login into the EAS with the same user name and password, but i am getting the following error when i try to ADD essbase server.
    admin July 7, 2010 12:40:32 AM CDT com.essbase.eas.admin.defs.AdminCommands.AddServerToUserList Succeeded
    winserver com.essbase.eas.essbase.defs.ServerCommands.Connect July 7, 2010 12:40:33 AM CDT Failed : 1051293 Login fails due to invalid login credentials
    Error: 1051293 Login fails due to invalid login credentials
    Essbase Server: winserver com.essbase.eas.essbase.defs.ServerCommands.Connect July 7, 2010 12:40:33 AM CDT
    Error: 1051293: Login fails due to invalid login credentials
    HELP!!
    Alex

    You have already posted the question here :- Error: 1051293: Login fails due to invalid login credentials
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to change the error message Invalid login credentials

    Hi all,
    How to change the default error messages .
    1) In the Login page while giving wrong username or password .It showing
    Error message "Invalid login credentials".
    But requirement is change the above error message.
    2) I need to change the error message instead of "1 error has occureed"
    Thanks in Advance
    Sudhakar

    On the Login Page of the application create a 'Before Header' process with this code if  apex_application.g_notification ='Invalid Login Credentials' then
             apex_application.g_notification :='Your Altered Failed Login Message Here';
      end if;varad

  • Invalid Login Credentials -- urgent

    Hi Everyone,
    I was in my application. I wanted to change the my user name instead of long big one. I went to Mange Application Express User from Home page. I have changed my user name (i have changed to same as my workspace name). Now I am trying to login but it giving me following error:
    "Invalid Login Credentials"
    Now I can't use my old user name.
    Please help me. How can I use it?
    BA

    All sorted. Do not worry.

  • Cannot connect to olap service. Cannot connect to Essbase Server. Error:Essbase Error(1051293): Login fails due to invalid login credentials

    Hello All,
    I am getting following error, when trying to expand essbase from calculation manager, "Cannot connect to olap service. Cannot connect to Essbase Server. Error:Essbase Error(1051293): Login fails due to invalid login credentials",
    I am using EPM 11.1.2.1
    Thanks
    Yash

    If you have moved the server to a new data center and an issue has started occurring then it could point to the change.
    Are you able to log into essbase directly with Maxl using the same account?
    If you run a registry report do you see any of the configuration with IPs instead of DNS/hostname
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Invalid Login Credentials

    I am working on my application and can work on the pages but when I try and log in and run them I'm getting the "Invalid Login Credentials" message. It worked fine Friday and when I got to work this morning it wouldn't run. Any ideas? Help!

    We are getting a blade in approx. two week which will be dedicated to Apex and I will be setting up the production environment. I'm curious about how to set up a development vs. production area and security issues as well. I think Craig and Ron will be here tomorrow and I'll broach the subject with them.

  • Invalid login credentials after upgrading to 3.0.1

    I have upgraded our apex2.1 version to 3.0.1. When trying to login for the first time I entered my database user name in the workspace field and enter my database user name and password as per upgrade instructions. However, all I get is the error 'Invalid login credentials'. The upgrade instructions do not mention any additionals action steps that must be taken. Can anyone please advise how to solve this problem.
    Thanks, Richard

    I had the same problem and tried about everything with no success, until ...
    I changed the ADMIN password using the apxxepwd.sql script (can be found in the root of the 3.0.1 apex directory). Run this script under sqlplus as "sys/password as sysdba" and enter twice the ADMIN password when prompted for '&1'. Login on http://localhost:8080/apex/apex_admin, you'll be prompted to change the password. Change the password (may be the same as the old one) and now you can finally login as ADMIN.
    I did this on APEX 3.0.1 on a Oracle EXPRESS 10.2.0.1.0 on Windows Vista, and suppose this must work on other platforms too.

  • Invalid Login Credentials  after a brand new install of APEX 2.2

    I'm trying to install APEX2.2 for the first time to see what it can do.
    I have followed the install document.
    When I got ot here, http://localhost:7777/pls/htmldb
    It requests a workspace, username, password.
    back to the documentation, it states use http://localhost:7777/pls/htmldb/apex_admin
    to create your workspace. And to sign in as admin, and the password passed into @apexins.sql When I try that, it results in the error message "Invalid Login Credentials" The documentation does not describe anything about that!
    Please help
    Thanks,
    Jason

    Joel,
    I had a cut and paste error in my last posting, I actually ran this:
    alter user FLOWS_020200 account unlock;
    connect FLOWS_020200/apex
    begin
    wwv_flow_api.set_security_group_id(p_security_group_id=>10);
    wwv_flow_fnd_user_api.create_fnd_user(
    p_user_name => 'admin2',
    p_email_address => '[email protected]',
    p_web_password => 'admin2') ;
    end;
    alter user FLOWS_020200 account unlock;
    I have a thought on why Ben and I both had this same "Invalid Login Credentials" issue. In my case it certainly wasn't because of any special characters in the password. I used apex as a password.
    From reading Ben's post I see we both first had a problem with the images directory. Sounds like Ben had the same issue I had. Which was in the marvel.conf I first entered this
    Alias /i/ "C:\oracle\product\10.2.0\db_as\Apache\Apache\images"
    instead of this:
    Alias /i/ "C:\oracle\product\10.2.0\db_as\Apache\Apache\images/"
    This caused my http://localhost:7777/pls/htmldb URL to paritially work. I'm thinking that may be what caused the "Invalid Login Credentials" once I made the Alias adjustment.
    Thanks,
    Jason

  • Translation of "Invalid Login Credentials" message

    Hi
    I've application (just) in non-english language. Shared Component / Globalization / Text Messages works well for the translation of "Next/Prev", "Error" texts, but where to translate invalid login error message?
    Roman

    I do not assume you translate APEX into Czech language
    Not yet.
    Your function can redirect to a page that shows the message you like. For example, if you wanted to redisplay the login page with the message, just do something like this:
    owa_util.redirect_url('f?p=' || v('APP_ID') || ':101:' || v('APP_SESSION') || ':MSG' );
    apex_application.g_unrecoverable_error := true;
    return false;
    Then adjust your login page so that a message appears if the "request" value is 'MSG'. The redirect_url shown above sets the request value to 'MSG'. Normally the login page would not show the message because that request value would not be present.
    Scott

  • Restart Admin Login Credentials in Apex 4.0 & Oracle 11gr2

    Hi all,
    We face a major issue. We are unable to connect our admin account for some unknown reason. We keep receiving the following message "Invalid Login Credentials". We tried to change the admin credentials with sqlplus.
    We tried the usual procedure "apxchpwd" successfully, but we still cannot log in.
    We then tried to create a new admin2 account with the following pl/sql block.
    SQL> connect APEX_030200 as sysdba
    Enter password:
    Connected.
    SQL> begin
    2 wwv_flow_api.set_security_group_id(p_security_group_id=>10);
    3 wwv_flow_fnd_user_api.create_fnd_user(
    4 p_user_name => 'admin2',
    5 p_email_address => '[email protected]',
    6 p_web_password => 'admin2') ;
    7 end;
    8 .
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> commit
    2
    SQL> commit;
    Commit complete.
    SQL> alter user APEX_030200 account lock;
    User altered.
    SQL> quit
    We cannot connect with either admin & admin2.
    Any good idea?
    Roger

    Hi,
    I'm not expert on this area, sorry.
    I would check what like FLOW% and APEX% users there is in database.
    Also query DBA_REGISTRY what is current/valid APEX version.
    Then try again with correct APEX versions scripts reset ADMIN password.
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • BT Wifi Invalid Login - Broadband Customer

    Hello.
    I am a Total Broadband Option 3 Customer
    I am using my @btinternet.com email adress and password (all correct)
    I have been a customer for more than three years and have secondary @btinternet.com accounts too, which also don't work.
    The account holder has changed hands since the broadband+phone account was created
    When I try to log into Bt Wifi, or register for BT wifi, I get an invalid login credentials message.
    When I try to "opt in" I get invalid login credentials.
    All troubleshooting steps (Resetting passwords), using the app on android, IOS windows 8 or from the login page on any device or laptop fail to get me anywhere.

    mark_s wrote:
    But why don't BT allow users of secondary emails to login to BT Wi-Fi??
    Probably because it was introduced before it became compulsory for everyone to carry a mobile device at all times. Extending it to sub accounts has often been suggested but there's been no discernable movement on that by BT.
    I have a joint BT account with my partner, but can't use BT Wi-Fi as she has the primary email.
    It's news to me that BT do joint accounts. If that's the case there's nothing to stop you using the primary account details on another device.
    You can click the white star next to this message if you think it was helpful.

  • Htmldb login credentials invalid

    Hi,
    this is what i did. i backed up the 3 htmldb schemas long back. and now i imported the shemas into my new target database. i installed the http server in my win xp system connecting to my target database and when i try to login into the following pages
    http://localhost:7777/pls/htmldb and
    http://localhost:7777/pls/htmldb/htmldb_admin
    i get error saying login credentials invalid
    i am not able to login for both INTERNAL workspace as well as for the workspace that i created before.
    how can i reset the login and be able to login.
    i am not sure whether this error is because of password obfuscation.
    i am copying my marvel.conf file below, please have a look at it.
    Alias /i/ C:/oracle/product/10.2.0/http_1/htmldb/images/
    <Location /pls/htmldb>
    Order deny,allow
    PlsqlDocumentPath docs
    AllowOverride None
    PlsqlDocumentProcedure wwv_flow_file_manager.process_download
    PlsqlDatabaseConnectString localhost:orcl ServiceNameFormat
    PlsqlNLSLanguage AMERICAN_AMERICA.WE8MSWIN1252
    PlsqlAuthenticationMode Basic
    SetHandler pls_handler
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDatabaseUsername HTMLDB_PUBLIC_USER
    PlsqlDefaultPage htmldb
    PlsqlDatabasePassword @BYLvtjinyJPWqEnRMD9fYtI=
    Allow from all
    </Location>
    Can someone help me solve this problem.
    Thanks,
    Philip.

    zvika--
    i gave you our email address yesterday when i responded to your post at...
    can't login to htmldb
    ...so i'm not sure why you're asking for it again. anyhow, i see your email now and will respond in a bit.
    regards,
    raj

  • Invalid Login Using Trusted Authentication

    My productive database server always report "Invalid Login Using Trusted Authentication" in udump. Could you tell me what is mean? would it influent oracle running?

    Can we test a single connection using SQL authentication and If still persist, you have to double check that credential
    if it is still trying to connect SQ Server and identify if it is hitting the
    same DB on the same server or other DBs  since I do think this errors is related to other DBs
    Kindly work out  it and please let know me your feedback                                               
    Shehap (DB Consultant/DB Architect) Think More deeply of DB Stress Stabilities

Maybe you are looking for

  • Mini DP to VGA or Mini DP to DVI?

    I need to connect my MacBook (late 2008) to my AOC Fovi F22 display. The display has VGA and DVI inputs. The display resolution is 1920x1080 Full HD. 1. Which one is the more sensible choice? DVI perhaps? 2. I hear that people are facing issues with

  • HELP-highlighting text in Word with Snow Leopard...

    I am on my MBP, working within a virtual course dealing w/ Word 2010.... within the coursework, I have to highlight text within the examples I'm working on, in order to move to the next step in the tutorial... I'm having a hard time getting the highl

  • Language problem in App Store.

    Hi,I'm come from Malaysia. My problem is how to change the language in App Store. In the previously, the App Store was using English to guide us download application.But it change to Malay recently. Anyone can help me solve the problem?

  • Object Casting in a JSP

    When getting data from the usual HttpSession object, I understand how the following (for simplicity) hypothetical line of code works: AccountInfo someAccount = (AccountInfo) session.getAttribute( ... ); Here, assume that "AccountInfo" is a bean i.e.,

  • 6680 firmware update not available?

    Hi, I have a 6680 on O2. I'm seeing "No software update available" although I think there should be newer software. My current firmware version from *#0000# is : v3.04.11 14-04-05 And on the Web there are many references to: v5.04.07 15-02-06 RM-36 (