The SecurityContext API
As we mentioned earlier, the SecurityContext API provides programmatic security. The IdentityStore and authentication mechanisms are like declarative modes for handling security, whereas the SecurityContext API is geared toward more programmatic control for the authentication and authorization mechanisms in the application. This new SecurityContext interface unifies many different security APIs that were scattered across individual Java EE technology specifications.
The SecurityContext object represents all security information that has been gathered on the user who made the current request. An implementation of the SecurityContext API should be provided at runtime as a CDI-managed bean. We can inject SecurityContext ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access