Can you explain how Spring Security manages authentication and authorization in a Java application?

Technical