-
Notifications
You must be signed in to change notification settings - Fork 21
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
rust: adds sign_with
function
#249
Conversation
8e09306
to
b8c6be8
Compare
sign_with
function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I like the typed builder. Just added some nits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some more general comments.
Also the examples need updating.
rust/src/sign/mod.rs
Outdated
impl<'a> SignerBuilder<'a, &'a str, Unset, Unset, PhantomData<Get>, &'a str> { | ||
/// Builds a [`CustomSigner`] | ||
pub fn build_custom_signer(self) -> CustomSigner<'a> { | ||
CustomSigner { | ||
kid: self.kid, | ||
body: &[], | ||
method: Get::name(), | ||
path: self.path, | ||
headers: self.headers, | ||
jws_jku: self.jws_jku, | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're getting rid of the old sign_with_pem
and verify_with_...
functions and going for the full breaking change, do we still need the distinction between old (v1) and new "custom" signers/verifiers?
Just wondering if they can be combined and just expose different functions (depending on which types are populated in the builder).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but it would be good to have a second approval for those changes.
Co-authored-by: Kevin Plattret <kevin@plattret.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just some ocd nits
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
Co-authored-by: Marco Tormento <91872926+tl-marco-tormento@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
BREAKING CHANGE / bumping from v0.1.3 to v0.2.0
sign_wtih
Once the library is published, I will update the rust examples in a separate PR.