eclipse-ee4j / eclipse-ee4j/soteria

Faces 3 + Soteria: redirect on viewexpired on ajax request

Open
#322 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
73
Forks
35
PR merge metrics
No merged PRs in 30d

Description

Actually Soteria do not manage this, which is the best place to implement the correct "ajax" redirect?

something like the one proposed by BalusC

[https://stackoverflow.com/questions/13366936/jsf-filter-not-redirecting-after-initial-redirect/13369719#13369719](https://stackoverflow.com/questions/13366936/jsf-filter-not-redirecting-after-initial-redirect/13369719#13369719)

```
String loginURL = req.getContextPath() + "/login/login.xhtml";

if (!authenticated && !req.getRequestURI().equals(loginURL)) {
if ("partial/ajax".equals(request.getHeader("Faces-Request"))) {
res.setContentType("text/xml");
res.getWriter()
.append("")
.printf("", loginURL);
} else {
res.sendRedirect(loginURL);
}
} else {
chain.doFilter(request, response);
}
```

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named. Start by tracing how Soteria handles expired views and authentication redirects, then investigate how Faces-Request marks AJAX requests. Done means the correct redirect behavior is defined and verified for both AJAX and non-AJAX requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.