# FAQ

#### **Q: How should I use this class?**

* You need to first instantiate a SOFA object with the authorization server and the authorization scope.
* The application then calls the appropriate `authenticateWithXxx()` method based on the desired OAuth 2.0 authentication method (grant type).
* From then on, the application can get a valid access token anytime thru `getAccessToken()` or a ready-to-use HTTP authorization header with `getHttpAuthorizationHeader()`. If the access token has expired in the meantime, SOFA will transparently call the authorization server again for a refreshed or a new token based on the used grant type.
* The HTTP authorization header with the access token must then be added to each HTTP request sent to the server holding the protected resource.

#### **Q: Does SOFA need any additional library or jar files?**

* Only one additional library (`org.json.JSONObject`) is used to parse the returned JSON data from the authorization server. The required class is included in the distribution package.

#### **Q: Is SOFA affected by the Apache Log4j vulnerability?**

* No, SOFA uses the standard Java Logger class which was not affected by this vulnerability.&#x20;

#### Q: How can I get support?

* Support is provided on best-effort basis. You may contact the author thru email at <andy.brunner@k43.ch>. Please describe your problem as detailed as possible and include the [debugging](/quick-start/logging-debugging.md) log whenever possible. Note that the log does not include any confidential data.


---

# 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://sofa.k43.ch/hints-and-tips/faq.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.
