質問

We have a websphere application server that runs a java filter when j_security_check is run. We authenticate a user using Websphere's custom registry. When the filter runs I need to know whether or not the user that logged in was authenticated. I have tried to get the remote user from the request but it returns null if the user authenticated successfully or not successfully. It seems that the remote user has not been built when this filter runs. I am assuming that the custom registry code runs before the java filter runs.

Is there anyway to test if the user has been successfully authenticated inside of my java filter.

Thanks Doug

役に立ちましたか?

解決

I have found the answer. I was testing for the remote user before the chain.doFilter() method was called, in my filter. The authentication process (In Websphere) happens after the doFilter chain happens. So I moved my code that checks if a user is authenticated after the chain.doFilter() method. This fixed the issue.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top