Hi,

I have the following configuration

configuration.add(SecuritySymbols.LOGIN_URL, "/signin");
        configuration.add(SecuritySymbols.UNAUTHORIZED_URL,
"/error/unauthorized");
        configuration.add(SecuritySymbols.SUCCESS_URL, "/account");
        configuration.add(SecuritySymbols.REDIRECT_TO_SAVED_URL, "true");

    public static void
contributeSecurityConfiguration(Configuration<SecurityFilterChain>
configuration,
            SecurityFilterChainFactory factory) {
        // /authc/** rule covers /authc , /authc?q=name /authc#anchor urls
as well

configuration.add(factory.createChain("/account").add(factory.authc()).build());

configuration.add(factory.createChain("/account/user/**").add(factory.user()).build());

configuration.add(factory.createChain("/account/dealer/**").add(factory.roles(),
"dealer").build());

configuration.add(factory.createChain("/account/admin/**").add(factory.roles(),
"admin").build());

configuration.add(factory.createChain("/sell/uploadphotos/**").add(factory.authc()).build());
    }

Unauthorized Page

pages.error

public class Unauthorized.class {
}

/error/unauthorized.tml

When ever a user attempts to access a page with an without the correct
role, rather than redirect them to the Unauthorized page, they get the
following error.

HTTP Status 401 -
------------------------------

*type* Status report

*message*

*description* *This request requires HTTP authentication.*
------------------------------
Apache Tomcat/7.0.47


Anybody know why this isn't working?

Reply via email to