Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:util="http://www.springframework.org/schema/util"
- xmlns:security="http://www.springframework.org/schema/security"
- xmlns:task="http://www.springframework.org/schema/task"
- xsi:schemaLocation="
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.2.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
- <security:http>
- <security:intercept-url pattern="/faces/gestor" access="ROLE_USER" />
- <security:form-login login-page="/login.html" default-target-url="/faces/gestor/visualizaractualizarestabelecimento.xhtml" authentication-failure-url="/login.html?erro=true"/>
- <security:logout logout-success-url="/login.html" />
- </security:http>
- <bean class="mz.co.mpteventos.springsecurity.controller.UserDetailServiceImpl" id="userDetailsService"></bean>
- <security:authentication-manager>
- <security:authentication-provider user-service-ref="userDetailsService"></security:authentication-provider>
- </security:authentication-manager>
- </beans>
- **Controlador**
- <form class="login-container"
- action="/springsecurity/j_spring_security_check" method="POST">
- <p>
- <input placeholder="Username" id="j_username" name="j_username"
- type="text" class="validate" required="required"> <label
- for="first_name">Introduza o nome de usuario</label>
- </p>
- <p>
- <input id="j_password" name="j_password" class="validate"
- type="password" placeholder="Password" required="required">
- <label for="last_name">Introduza a senha</label>
- </p>
- <p>
- <input name="action" type="submit" value="Entrar" >
- </p>
- </form>
- </div>
- <form class="login-container"
- action="/springsecurity/j_spring_security_check" method="POST">
- <p>
- <input placeholder="Username" id="j_username" name="j_username"
- type="text" class="validate" required="required"> <label
- for="first_name">Introduza o nome de usuario</label>
- </p>
- <p>
- <input id="j_password" name="j_password" class="validate"
- type="password" placeholder="Password" required="required">
- <label for="last_name">Introduza a senha</label>
- </p>
- <p>
- <input name="action" type="submit" value="Entrar" >
- </p>
- </form>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement