# Java EE Security API 1.0

Java EE Security API provides portable interfaces for HTTP authentication and identity stores, and a context aware `SecurityContext` which can be injected into other beans and allow you customize security programmatically.

`HttpAuthenticationMechanism` is used for authenticating users from applications.

`IdentityStore` is used for validating user credentials and retrieve its group information.

`SecurityContext` is used for querying the current security context in any context, eg. Servlet, JAX-RS, EJB etc.

Beside these, such as `Authenticaiton`, `Authorization`, `UserPricinpal`, `Realm` etc are very similar with [the terminology from Apache Shiro](https://shiro.apache.org/terminology.html).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hantsy.gitbook.io/java-ee-8-by-example/security.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
