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

Add alias for obtaining the public key #119

Merged
merged 5 commits into from
Jan 21, 2020
Merged

Add alias for obtaining the public key #119

merged 5 commits into from
Jan 21, 2020

Conversation

lbalmaceda
Copy link
Contributor

@lbalmaceda lbalmaceda commented Jan 17, 2020

Description

Attempt to provide backwards compatibility for obtaining the PEM representation of the public key (RSA or not).

When this is merged, users of the library can quickly access the public key instance of the jwk object by calling getPublicKey().

// before
const signingKey = key.publicKey || key.rsaPublicKey;

// now
const signingKey = key.getPublicKey()

References

Nothing linked here yet

Testing

Added unit tests that assert that the pem property has the same value as the publicKey and rsaPublicKey properties.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@lbalmaceda lbalmaceda added this to the v1-Next milestone Jan 17, 2020
@lbalmaceda lbalmaceda requested review from a team and damieng January 17, 2020 22:13
src/JwksClient.js Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
@lbalmaceda
Copy link
Contributor Author

lbalmaceda commented Jan 20, 2020

Added readme changes. Will add a small paragraph to the changelog on the next release instructing to use the new method.

src/JwksClient.js Outdated Show resolved Hide resolved
src/JwksClient.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants