Skip to content

Commit

Permalink
passing HttpServletRequest from CredentialFilter to Auth Class when user
Browse files Browse the repository at this point in the history
not logged in
  • Loading branch information
jad-elkhoury committed May 19, 2022
1 parent 79d057e commit 3a23244
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected void configure() {
[/template]

[template public generateResourcesFactoryFactory(anAdaptorInterface : AdaptorInterface) post (trim())]
private static final class ResourcesFactoryFactory implements Factory<[anAdaptorInterface.javaClassNameForResourcesFactory()/]> {
private final class ResourcesFactoryFactory implements Factory<[anAdaptorInterface.javaClassNameForResourcesFactory()/]> {
@Override
public [anAdaptorInterface.javaClassNameForResourcesFactory()/] provide() {
return new [anAdaptorInterface.javaClassNameForResourcesFactory()/](OSLC4JUtils.getServletURI());
Expand All @@ -105,7 +105,7 @@ private static final class ResourcesFactoryFactory implements Factory<[anAdaptor

[template public generateStorePoolFactory(anAdaptorInterface : AdaptorInterface) post (trim())]
[if (anAdaptorInterface.storeEnabled())]
private static final class StorePoolFactory implements Factory<StorePool> {
private final class StorePoolFactory implements Factory<StorePool> {

private Optional<String> getPropertyFromEnvironment(String envKey) {
final Map<String, String> env = System.getenv();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public class [anAdaptorInterface.javaClassNameForAuthenticationApplication()/] i
* @throws IOException
* @throws ServletException
*/
public void sendUnauthorizedResponse(HttpServletResponse response, Exception e) throws IOException, ServletException {
public void sendUnauthorizedResponse(HttpServletRequest request, HttpServletResponse response, Exception e) throws IOException, ServletException {
// [protected ('sendUnauthorizedResponse_init')]
// [/protected]
// Accept basic access or OAuth authentication.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public class [anAdaptorInterface.javaClassNameForCredentialsFilter() /] implemen
} catch (AuthenticationException e) {
// [protected ('basicAuth_authenticationException')]
// [/protected]
authenticationApplication.sendUnauthorizedResponse(response, e);
authenticationApplication.sendUnauthorizedResponse(request, response, e);
return;
}
}
Expand Down

0 comments on commit 3a23244

Please sign in to comment.