How to Get HTTP Request & Response Object From javax.security.auth.spi.LoginModule. (Doc ID 1169833.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle Weblogic Server - Version 9.2 and later
Information in this document applies to any platform.
***Checked for relevance on 15-Apr-2013***

Goal

The 'javax.security.auth.spi.LoginModule' describes the interface implemented by authentication technology providers. LoginModules are plugged in under applications to provide a particular type of authentication. After creating a custom AuthenticationProvider on WebLogic 9.2 in the LoginModule implementation you need to get the 'javax.servlet.http.HttpServletRequest' object (the requirement is to authenticate the IP of the user).
You have also tried the javax.security.jacc.PolicyContext.getContext("javax.servlet.http.HttpServletRequest") method supported by other application servers but this doesn't work in WLS.
How to get access to HTTP request and response object from javax.security.auth.spi.LoginModule?

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms