Bookmark does not redirect to login page

Asked

Viewed 123 times

0

I followed the post about authentication and authorization in Demoiselle but I can’t redirect to the login page, follow files:

frameworkdemoiselle.security.enabled=true 
frameworkdemoiselle.security.authorizer.class=br.gov.serpro.bookmark.security.Autorizacao    
frameworkdemoiselle.security.authenticator.class=br.gov.serpro.bookmark.security.Autenticacao 
frameworkdemoiselle.security.login.page=/login.xhtml
frameworkdemoiselle.security.redirect.after.login=/index.xhtml
frameworkdemoiselle.security.redirect.after.logout=/login.xhtml
frameworkdemoiselle.security.redirect.enable=true

login screen.xhtml

<h:head>
    <title>#{messages['main.app.title']}</title>
</h:head>

<h:body>
    <h:form>
        <p:growl id="messages" />
        <p:menubar style="font-weight: bold; font-size: small">
            <p:menuitem value="Portal Sistema" url="#" />
            <f:facet name="options">
                <p:outputLabel for="login" value="Usuário: " />
                <p:inputText id="login" style="margin-right:10px"
                    value="#{loginMB.usuario}" required="true"/>
                <p:outputLabel for="senha" value="Senha: " />
                <p:inputText id="senha" style="margin-right:10px"
                    value="#{loginMB.senha}" required="true"/>
                <p:commandButton value="Login" icon="ui-icon-locked"
                    action="#{loginMB.doLogin()}" />
            </f:facet>
        </p:menubar>
    </h:form>
</h:body>

  • Any specific rules in web.xml? filter?

  • I don’t understand about this, but I believe it’s JSF? I added the tags, please reverse the edit if I’m wrong.

  • this topic is the same http://answall.com/questions/54887/redirecionar-para-p%C3%A1gina-de-login-to-access-other-p%C3%A1gina-sem-Usu%C3%A1rio-estar-loga

  • I followed that thread, and it didn’t work...

1 answer

1


Check on this link Example Application the necessary settings according to the version of Demoiselle you are using.

  • I can’t really make the redirect to login page work, I followed the example of parking and nothing. link to the github project: https://github.com/WdCarrijo/bookmark

  • In your project the index.html file was redirecting to the other index.xhtml when it should be for login.xhtml. There were also some other corrections. In order not to get an extensive response, I pulled-request your application on Github, seeing the changes you will notice what was missing. But in case you have any more questions, just ask around.

  • Hello Emerson, I did everything you had done:

  • It only lacked some things, of type, rendered, actionListener, I did not understand for sure, but I will test the changes.

  • Thank you all for your help.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.