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

fix pattern and toString, then enhance sign() method #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ytvnr
Copy link

@ytvnr ytvnr commented Sep 13, 2021

Fix pattern

Fixing RFC_2617_PARAM to be able to parse timestamp with a , separated decimal part (for example, for french people)

Fix Signature.toString()

I don't understand why created and expires disappeared from Signature string if algo is not HS2019.
What I propose is to only add those informations if not null and if headers contains (created) or (expires)

Add a new Signer.sign() method

Create a new public Signature sign(final String method, final String uri, final Map<String, String> headers, Long created, Long expires) throws IOException

The idea here is to provide a way to sign giving the choice of created and expires timestamp.
It is useful for a validation case from a string, you are able to regenerate a signature from input and keep control on those two timestamps.

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.

1 participant