이 콘텐츠는 선택한 언어로 제공되지 않습니다.
15.3.7. Login Redirection
When an unauthenticated user tries to access a particular view or wildcarded view ID, you can have Seam redirect the user to a login screen as follows:
Note
This is more refined than the exception handler shown above, but should probably be used in conjunction with it.
After the user logs in, we want to automatically redirect them to the action that required log in. If you add the following event listeners to
components.xml
, attempts to access a restricted view while not logged in are remembered. Upon a successful log in, the user is redirected to the originally requested view, with any page parameters that existed in the original request.
Note
Login redirection is implemented as a conversation-scoped mechanism, so do not end the conversation in your
authenticate()
method.