Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

feat: allow regex in SMARTConfig.expectedAudValue #43

Merged
merged 2 commits into from
Jul 9, 2021

Conversation

carvantes
Copy link
Contributor

Allow RegExp as expectedAudValue.

This enables use cases where the apiUrl is not static. The main use case is for multi-tenancy with tenant-specific urls, but there may be other use cases.

Only minor code changes are required since the jsonwebtoken package already accepts string | RegExp when verifying the aud value.
https://www.npmjs.com/package/jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback

Note: This is intended to support multi-tenancy but it is a generic change so no feature branch is being created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@carvantes carvantes requested a review from rsmayda July 9, 2021 07:55
@carvantes carvantes merged commit 2442856 into mainline Jul 9, 2021
@carvantes carvantes deleted the dev-aud-regex branch July 9, 2021 17:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants