6 Replies Latest reply: Dec 31, 2013 7:11 AM by mjondle RSS

    Use a Post-Authentication Process with LDAP

    mjondle

      I am decently new to APEX and have set up LDAP authentication for my application. It's working as expected.  However, due to our training guidelines, no one can have access to the application without getting the proper training.  I have a table in the database for users that will be managed by the system owner once development is complete and each user has an ACTIVE field that can be toggled.  I need a post-authentication procedure that checks the ACTIVE field in the USER table to make sure that it returns TRUE before we allow them access to the application.  Any help would be greatly appreciated!

       

      Application Express 4.2.1.00.08

       

      DECLARE

          l_is_active        number;

          l_return           boolean;

      BEGIN

       

      select count(*)

      into l_is_active

      from user

      where ldap_id = : P101_USER_ID

      and active = 'T';

       

      IF l_is_active > 0 THEN

         l_return := TRUE;

      ELSE

         l_return := FALSE;

      END IF;

       

      END;