Thank you for your answer. So I tried several approaches with this advice.
Version no.1 (this one looks better)
In browser when I login it redirects me me to the blank page instead of calling login form again-so I think this means that everything is ok with both methods.
When I try to send credentials using postman- app throwing me InternalAuthenticationServiceException in authenticate method (in both versions). And Im not sure right now if it is lack of experience and basic knowledge about postman or still something is wrong with this code.
Thank you for review!
So, in Postman, do you set username and password in the header of the request?
I mean click on the "Headers" and input username as the key , admin as the value. Also input password as the key , BASIC $2a$10$7F7xGm8iuzafFA7RPS8gzeKJm9qNBwtejT4hSuBKXMNlc/4NxOy1G as the value.
Also, do you specify formLogin().loginPage("/login") in your security config ?