18 lines
606 B
HTML
18 lines
606 B
HTML
<!DOCTYPE html>
|
|
<html xmlns:th="http://www.thymeleaf.org">
|
|
<head>
|
|
<title>Welcome to Spring Security Thymeleaf tutorial</title>
|
|
</head>
|
|
<body>
|
|
<h2>Welcome</h2>
|
|
<p>Spring Security Thymeleaf tutorial</p>
|
|
<div sec:authorize="hasRole('USER')">Text visible to user.</div>
|
|
<div sec:authorize="hasRole('ADMIN')">Text visible to admin.</div>
|
|
<div sec:authorize="isAuthenticated()">Text visible only to
|
|
authenticated users.</div>
|
|
Authenticated username:
|
|
<div sec:authentication="name"></div>
|
|
Authenticated user roles:
|
|
<div sec:authentication="principal.authorities"></div>
|
|
</body>
|
|
</html> |