Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support auth0 ex #6

Merged
merged 17 commits into from
Dec 3, 2021
Merged

Support auth0 ex #6

merged 17 commits into from
Dec 3, 2021

Conversation

dallagi
Copy link
Member

@dallagi dallagi commented Nov 16, 2021

This PR adds support for authentication of machine to machine communication via auth0_ex.
To use this feature, clients need to set audience: "target-service" as an option when they use the bridge.

For the moment we approached testing with a black-box approach, in order to limit the changes to the previous implementation.

The build on drone is currently broken, as auth0_ex is a private repository and drone cannot reach it - until we fix it.

NOTE: This PR also fixes a typo in the configuration of the bridge, from max_attemps to max_attempts: we need to make sure that current users are not using the "typoed" configuration before updating this library for them.

andreapavoni
andreapavoni previously approved these changes Nov 16, 2021
lib/graphql.ex Outdated
@@ -49,6 +55,15 @@ defmodule BridgeEx.Graphql do
else
defp format_response({ret, response}), do: {ret, response}
end

defp with_authorization_headers(headers, nil), do: {:ok, headers}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visto che sei in una macro non vale la pena di compilare direttamete la funzione come fa sopra?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grazie ❤️
Se ho capito bene il punto, dovrebbe essere risolto con 105a71f

cottinisimone
cottinisimone previously approved these changes Nov 16, 2021
mbusi
mbusi previously approved these changes Dec 2, 2021
@mbusi mbusi merged commit c09f0be into master Dec 3, 2021
@mbusi mbusi deleted the support_auth0_ex branch December 3, 2021 15:27
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.

5 participants