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

move authenticate dispatch to multimethod for external dispatch #28

Merged
merged 3 commits into from Jun 14, 2019

Conversation

pyncc
Copy link
Contributor

@pyncc pyncc commented Jun 13, 2019

In support of adding a small extension to vault-clj, open up authenticate! dispatching.

Eg, an external library could implement vault.client.http.authenticate-type! for aws instance auth with:

(:require '[big-annoying-aws-library :as aws])

(defmethod vault.client.http.authenticate-type! :aws-iam
    [client _ credentials]
    (let [{:keys [iam-role] credentials]
        (aws/do-instance-authentication-hoop-jumping iam-role))

eg, to an extention not present in the core project ns
@codecov-io
Copy link

codecov-io commented Jun 13, 2019

Codecov Report

Merging #28 into develop will increase coverage by 0.36%.
The diff coverage is 86.66%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #28      +/-   ##
===========================================
+ Coverage    27.22%   27.58%   +0.36%     
===========================================
  Files            6        6              
  Lines          584      580       -4     
  Branches        17       17              
===========================================
+ Hits           159      160       +1     
+ Misses         408      403       -5     
  Partials        17       17
Impacted Files Coverage Δ
src/vault/client/http.clj 20% <86.66%> (+0.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b062667...3fed662. Read the comment docs.

src/vault/client/http.clj Outdated Show resolved Hide resolved
src/vault/client/http.clj Outdated Show resolved Hide resolved
src/vault/client/http.clj Outdated Show resolved Hide resolved
Copy link
Collaborator

@greglook greglook left a comment

Choose a reason for hiding this comment

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

:shipit:

@pyncc pyncc merged commit 2c9f865 into develop Jun 14, 2019
@pyncc pyncc deleted the open-authenticate-dispatch branch November 20, 2019 19:51
@pyncc pyncc restored the open-authenticate-dispatch branch March 31, 2021 21:19
@pyncc pyncc deleted the open-authenticate-dispatch branch March 31, 2021 21:20
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.

None yet

3 participants