Comments (6)
I could use a fake user to force redirect to other page, and for this user I can block access to other page.
So now, I can send user to forgotPassword page, and I can send mail.
Now user receive e-mail, and I need to manage redirect to link in e-mail, something like
https://ip:port/users/password/edit?reset_password_token=fZCr2zRt5DzQnxxx1FTo
But I can't access in method LogonMB. isLoggedIn() to request url and parameters, I have nullPointerException on FacesContext.getCurrentInstance()
from admin-starter.
Hi there, use admin.ignoredResources
in admin-config.properties:
admin.ignoredResources=/users/password/edit
More detais see here:https://adminfaces.github.io/docs/1.0.0/index.html#configuration
from admin-starter.
I set
admin.ignoredResources=forgotPassword
where forgotPassword.xhtml is the page that filter must ignore. It's on same directory of login and index pages of admin-starter, but filter always redirect to login page
I try also :
admin.ignoredResources=/forgotPassword
admin.ignoredResources=/forgotPassword.xhtml
admin.ignoredResources=forgotPassword.xhtml
from admin-starter.
You can also change isLoggedIn
logic in LogonMB here to return true if user is in forgotPassword page, ex:
@Override
public boolean isLoggedIn() {
return currentUser != null || FacesContext.getCurrentInstance().getViewRoot().getViewId().equals("forgotPassword.xhtml");
}
from admin-starter.
sorry
admin.ignoredResources=forgotPassword
works.
In all test that I've done, FacesContext.getCurrentInstance() always null in isLoggedIn methods if user is not logged
from admin-starter.
I think in early request cycles It will be, adding a null check may do the trick.
Glad that the ignoreResources config works
from admin-starter.
Related Issues (17)
- Maven archetype HOT 1
- Loading Animation (p:ajaxStatus) does not disappear at table HOT 4
- Make content div a JSF component HOT 1
- modify "content-header" in template HOT 6
- css priority HOT 1
- locale support HOT 5
- When I pass the parameter opno #{schAttListMB.onChecked(c.opno)} , it passes an empty string rather than the required opno referenced from the datatable checkbox click event. HOT 1
- Primefaces v11 not working. v10 has broken code HOT 1
- PWA compatible
- Side menu disappears when resize window to minimum HOT 1
- LayoutMB.java has a wrong package HOT 4
- Mudar a cor da barra superior HOT 1
- org.primefaces.model.LazyDataModel cannot be resolved HOT 2
- add control sidebar to customize layout HOT 19
- Replace 'href' for 'outcome' on menu links
- RTL Support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from admin-starter.