Newbie question - security aspects

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie question - security aspects

SMaric
I have built a basic Spring boot webApp and am now adding in the security aspects
I have activated the out of the box spring security starter - so get the default user login form

In my Navbar section i have
Log out
Log in

NOTE Navbar section is in my default.html template & so is used on ALL of my pages throughout the webApp

When I run up my app
I see ONLY the Log in link  (as expected)
When I click on that I get taken to the  the default user login form and can successfully login
And am presented with the next page

Navbar still shows the Log in link  (now NOT expected)

it is as though the authentication object is always null

??Any help greatly appreciated

Reply | Threaded
Open this post in threaded view
|

Re: Newbie question - security aspects

Reiju
use th:if in navbar-fragment, or some thymeleaf-extras-springsecurity's features