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

Send unsigned #769

Merged
merged 3 commits into from
Apr 28, 2022
Merged

Send unsigned #769

merged 3 commits into from
Apr 28, 2022

Conversation

endgame
Copy link
Collaborator

@endgame endgame commented Apr 27, 2022

This came up when @pbrisbin was adding SSO support - it would be nice to have an easy interface to send unsigned requests, in case AWS stand up more exotic auth methods.

I also refactored STS and SSO to use it.

  • Use EnvNoAuth in public type signatures
  • Remove Foldable withAuth from fromSSO
  • Remove Foldable withAuth from fromWebIdentity

Closes #758

@endgame
Copy link
Collaborator Author

endgame commented Apr 27, 2022

@pbrisbin We talked about doing this when you wrote up the SSO stuff - do you have time to take a look?

lib/amazonka/src/Amazonka/Send.hs Outdated Show resolved Hide resolved
lib/amazonka/src/Amazonka/Auth/SSO.hs Outdated Show resolved Hide resolved
lib/amazonka/BUILD.bazel Show resolved Hide resolved
@endgame
Copy link
Collaborator Author

endgame commented Apr 28, 2022

@pbrisbin What if, instead of requiring EnvNoAuth in sendUnsigned, I do the env {envAuth = Proxy} override inside sendUnsigned instead of the SSO/STS functions? This would give a more consistent interface and involve less type magic.

I think I will do this tomorrow.

@pbrisbin
Copy link
Contributor

That does seem reasonable to me. I think seeing sendUnsigned :: Env' withAuth better indicates "I'm going to ignore whatever auth there is", but you really have to understand how this library works to hear what it's saying, so 🤷

@endgame
Copy link
Collaborator Author

endgame commented Apr 28, 2022

I'm much happier with how this turned out. Thanks for your input.

@endgame endgame merged commit 5d7c28a into brendanhay:main Apr 28, 2022
@endgame endgame deleted the send-unsigned branch April 28, 2022 23:22
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.

Expose sendUnsigned; move sending functions to Amazonka.Send and re-export
3 participants