cancel
Showing results for 
Search instead for 
Did you mean: 

has someone used IAuthentication.forceLogoffUser succesfully?

Former Member
0 Kudos

Hi,

I´m trying to use the forceLogoffUser(req, res, url) method and when I try to select this method from the class methods is not even displayed, does anyone knows why?

what can be wrong in my code?:

import com.sap.security.api.UMFactory;

import com.sap.security.api.IAuthentication;

public void onActionforceLogoffAction(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

IAuthentication ia = UMFactory.getAuthenticator();

ia.

}

Does somebody has an idea?

Thanx in Advanced!

kind Regards,

Gerardo J

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

Try using this:

WDClientUser.forceLogoffClientUser(<url>);

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza and Jhansi,

thanx Alot for the answer, it is correct now I see the method I need using WD instead of IWD, and it works when I test the WebDynpro stand alone in the App server but when I use it into an iView in Portal I get a 500 Server Error and looking at the logs it refers something about the session, have you implemented this into an iView and worked fine?

Thanx in Advanced!

Kind Regards!

Gerardo J

Former Member
0 Kudos

Hi,

In your application properties, you can set the logoff url. set this as logoff url /irj/portal?logout_submit=1 and then just write this line of code to logoff.

wdClientUser.forceLogOffClientUser(null);

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza,

I Can´t do that cause I will be affecting the whole Portal and this is just for some users that authenticates from a differente login Page that just receive a credential number.

Thanx Alot!

Kind Regards.

Former Member
0 Kudos

Hi Gerardo,

This won't affect your complete portal because the application properties are pertaining to your application. This would only be applicable for the application that you are working on and the rest would continue with the normal behavior.

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza,

You are right it should just affect the Application, my consern is that I tried this aproach using my URL and it is sending an error, not even displaying the standard and the other issue is that just the iFrame where the iView containing the code is the one that is affected and not the whole page redirected.

Thanx in Advanced!

Kind Regards,

Gerardo J

Former Member
0 Kudos

Hi Gerardo,

Did you try giving the url /irj/portal?logout_submit=1?

It worked for me in my previous project.

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza,

I´m trying this, I´m configuring the Application logoff URL as my custom login page, and coding the WDClientUser.forceLogoffClientUser(null); in my Webdynpro.

Is this correct? cause configuring /irj/portal?logout_submit=1? as the logoff URL where would it take me?

I need to be loged out and redirected to my custom URL in this case.

Really apreciate the help!

Kind Regards,

Gerardo J

Former Member
0 Kudos

Hi Murtuza,

I tried as I wrote you but I´m geting the same error that I posted in the past, I´m getting a 500 Server Error in the browser and this in the logs :

Full Message Text

application Processing HTTP request to servlet finished with error.

The error is: java.lang.NullPointerException: null

Exception id:

Full Message Text

Exception occured during processing of Web Dynpro application sap.com/pb/PageBuilder. The causing exception is nested.

Full Message Text

Exception while destroying session.

Full Message Text

A number of 1 exceptions occured while destroying session.

Full Message Text

Exception occured during processing of Web Dynpro application local/LogOff/LogOffApp. The causing exception is nested.

When I test the Webdynpro directly outside a Portal iView It works just fine and it is redirecting me now to my custom URL, but used in a Portal iView send me those errors that I posted.

Kind Regards,

Gerardo J

Former Member
0 Kudos

Hi Again,

Looking into the Default Trace Log I found this interesting Warning conserning the Error:

com.sap.tc.webdynpro.clientserver.session.SessionExpiredLongJumpException: Session has expired due to a concurrent invalidation or logoff request. Hint: This might occur if multiple logoff requests are sent to Web Dynpro by the portal as it is the case when a logoff is executed and the portal has active embedded and isolated Web Dynpro applications. Only the first logoff request is processed, all following logoff requests will lead to this message but but can be ignored. Please restart the application.

Don´t know if it is because I´m executing it from an iView but other wise I don´t know where to put this to logut the users, I´m planing to put this on the mast head but I don´t know if it will behave different than what I´m getting now.

Kind Regards,

Gerardo J

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Gerardo,

You can use the forceLogoffClientUser with the WDClientUser. i.e, some thing like this:

WDClientUser.forceLogoffClientUser(url);

Thanks n Regards,

Jhansi Miryala