-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Description
I have a Spring Boot 2.3.1 application that uses thymeleaf-extras-springsecurity5. The sec:authorize="isAnonymous()" it's not workning when user is no logged in. The sec:authorize="isAuthenticated()" works fine, after I login, the button logout appears.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>2.3.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
<version>3.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<version>2.3.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>2.3.1.RELEASE</version>
</dependency>
<a sec:authorize="isAnonymous()" href="#" th:href="@{/login}"
class="whitespace-no-wrap text-base leading-6 font-medium text-gray-500 hover:text-gray-900 focus:outline-none focus:text-gray-900">
isAnonymous
</a>
Github repo: https://github.com/maykon-oliveira/exame-chunin-devdojo
fwollsch, awfly, bearics and nayan-rafiq