Skip to content

Conversation

@shaikathaque
Copy link
Member

@shaikathaque shaikathaque commented May 14, 2025

References

ENG-3627

Context / Summary

Adds ability to include response headers from Authlete API Responses.

Description / Changes Made

  • Adds a responseHeaders field to the ApiResponse class
  • When network requests are made to the Authlete API, if the response is of type ApiResponse, the http headers from ConnectionContext are set to the ApiResponse object.

Breaking Changes

No, this approach was chosen with backwards compatibility in mind.

Testing Instructions

  1. Checkout branch retrieve-response-headers of authlete-java-common, authete-java-jaxrs and java-oauth-server
  2. Run mvn clean install -Dgpg.skip=true in each directory to make sure the code changes are installed in your local maven repository
  3. Follow the instructions in https://www.authlete.com/developers/tutorial/signup/. Make sure you correctly configure authlete.properties in java-oauth-server to use your Authlete 3 service.
  4. Follow the instruction in the doc up till the part where you click Send Request. This triggers the /authorize endpoint to be called.
  5. Inspect the logs of java-oauth-server. You should see a the response headers logged, which include a hardcoded request id that was included in the request.

Can use this branch to test:
authlete/java-oauth-server@master...retrieve-response-headers
authlete/authlete-java-jaxrs#54

image

Added Tests?

No. Tested manually for now as there is no testing infrastructure setup for the network calls.

Related MRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants