deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Obermaier <>
Subject Secure Pages with Deltaspike Security + Typesafe View Configs
Date Thu, 13 Mar 2014 14:15:31 GMT

I'm struggling to integrate Deltaspikes Typesafe View Configs with my

I have a login view and another view. I created a typesafe View Config
like this:

@View(navigation = View.NavigationMode.REDIRECT)
public interface Pages extends ViewConfig {

    public class Login implements Pages {


    @Secured(value = CustomAccessDecisionVoter.class)
    public class Index implements Pages {


The my AccessDecisionVoter looks like this:

    public Set<SecurityViolation> checkPermission(final
AccessDecisionVoterContext accessDecisionVoterContext) {
        if (loggedIn) {
            return Collections.emptySet();
        return Sets.newHashSet(new Violation());

Now I want to achieve the following and don't have a clue how to do this:

1. Redirect to Login if the user doesn't have the permission (= the
AccessDecisionVoter returns SecurityViolations). At the moment I'm just
getting a


2. How can I redirect to another page if the user is already logged in
and the user navigates to the login view? Is this possible with the
Typesave View Config?

I hope these questions aren't classic Deltaspike beginner questions ;-).
Honestly, I had a hard time finding useful information about Deltaspike
via Google. Seems like there aren't that many people blogging about it :-)


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message