Skip to Content

Webdynpro user authentication

Hi All, please help.

I have a standalone wdp app that does not require login to view. I also have another wdp app that requires a login. Currently when the user executes a custom logon button in the first app the user is redirected to the second app. As the second app has authentication required setting the logon screen is displayed. If you enter a user and password the second app is displayed.

My problem is that if the user selects logon button the logon screen is displayed but without any possibility to navigate back to the first app. What i would really need is to be able to authenticate the user in the first app.

I cant seem to find and documents / code samples that show how to do the authentication within the first app before the redirect is executed. If anyone has any ideas. Please let me know. It would be something similar to the SDN login. The site is displayed and no logon screen is required to logon. You just enter your usr id and pw and login.

Thanks in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 14, 2010 at 06:58 AM

    Hi Juan,

    In the first application change the application's property and set the authentication as true and same in the iView for the application.

    Hope this may help you.

    Deepak!!!

    Add comment
    10|10000 characters needed characters exceeded

    • Ok solved, here in case you are interested.

      Custom Logon wdp page embedded in my app allows authentication.

      IWDRequest requestObj = ((IWDProtocolAdapter) WDProtocolAdapter.getProtocolAdapter()).getRequestObject();

      HttpServletRequest request = (HttpServletRequest)requestObj.getProtocolRequest();

      IWDResponse responseObj = ((IWDProtocolAdapter) WDProtocolAdapter.getProtocolAdapter()).getResponseObject();

      HttpServletResponse response = (HttpServletResponse)responseObj.getProtocolResponse();

      IUser user = UMFactory.getAuthenticator().getLoggedInUser(request, response);

      if (null == user) {

      try {

      request.setAttribute("j_username", "<userid>");

      request.setAttribute("j_password", "pw");

      Subject subject = UMFactory.getLogonAuthenticator().logon(request, response, "uidpwdlogon");

      Set<java.security.Principal> principals = subject.getPrincipals();

      java.security.Principal principal = null;

      Iterator< java.security.Principal> itr = principals.iterator();

      for(;itr.hasNext();){

      principal = itr.next();

      wdThis.debug("Checking Principals principal : "+principal.getName());

      }

      } catch (LoginException e) {

      //do some stuff

      }

      }

      Cheers

  • Jul 14, 2010 at 09:37 AM

    See post

    Add comment
    10|10000 characters needed characters exceeded