cancel
Showing results for 
Search instead for 
Did you mean: 

Can I get the resource in a JAAS login module?

Former Member
0 Kudos

G'day,

I am writing a custom JAAS login module for deplyment in Netweaver application server. I'd like to get information about the resource that is protected by that login module (specifically, the URL).

The HttpGetterCallback class does not provide this information. All I can get is the host name and port from the HTTP headers.

Is there any way to get the full URL of the resource within a login module?

-- Geoff

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

G'day,

Note also that I tried using the WebCallback class, which has a getRequest() method that returns a HttpServletRequest.

But this callback seems to be ignored by the callback handler used in Netweaver AS, as the getRequest() method returns null, even though the login module is used to protect a servlet.

[ As an aside, I passed a custom callback to the CallbackHandler supplied by Netweaver AS, and the callbackHandler.handle() method did not throw UnsupportedCallbackException, which seems to be in violation of the JAAS standard ]

So ... HttpGetterCallback does not return resource URL information, and WebCallback is apparently ignored by the callback handler (which should really throw an exception here).

Are there any other ways to get the URL of the resource in a Netweaver AS login module?

Former Member
0 Kudos

Geoff,

Have the same issue.

Please let me know if you have a solution.

Regards

Sudhish

Former Member
0 Kudos

G'day,

I think that accessing full resource information from within a login module called by Netweaver AS is not possible. The login module is restricted to the information available via HttpGetterCallback and HttpSetterCallback classes. This would seem to rule out login modules that handle federation (which requires the URL), for example.

However, a login module called by Netweaver Portal can use the WebCallback class, which allows access to the HttpServletRequest object, which can be used to obtain the request URL, etc.

I don't know why Netweaver AS does not support WebCallback, or why the callback handled in Netweaver AS does not handle unexpected callbacks correctly.

--Geoff