-
Notifications
You must be signed in to change notification settings - Fork 90
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
feat: auth service-to-service api #3148
Merged
BlairCurrey
merged 23 commits into
2893/multi-tenancy-v1
from
bc/3125/auth-backend-service-api
Jan 14, 2025
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
f48bc8f
feat(auth): add service api with /healtz endpoint
BlairCurrey e593b2a
feat(auth): tenant routes
BlairCurrey cab3e2c
feat(auth): service api error handling
BlairCurrey 0ded2df
chore(auth): rm old todo
BlairCurrey 7cc448d
fix(auth): how errors are set
BlairCurrey d2b6411
fix(auth): improve tenant tests, cleanup tenant get response,
BlairCurrey b3eda45
feat(backend): auth service api client
BlairCurrey ecae9f2
fix(auth): change status codes to 204 where no body
BlairCurrey 8e51dff
fix(backend): format
BlairCurrey 0bab0c4
feat(auth): add required deletedAt to DELETE /tenant body
BlairCurrey 9ce0f4d
Merge branch '2893/multi-tenancy-v1' into bc/3125/auth-backend-servic…
BlairCurrey 5fe1061
feat(backend): AUTH_SERVICE_API_URL env var
BlairCurrey dba2cd4
fix(backend): auth service client tests to mock codes correctly
BlairCurrey 02cc1d5
feat(backend): add AuthServiceClient dep
BlairCurrey 5635631
feat(backend): use auth service client in tenant service
BlairCurrey 2742f1b
chore(auth): format
BlairCurrey a499775
chore(auth): format
BlairCurrey 2f60a86
fix(integration,localenv): auth service api config
BlairCurrey 0188f2f
fix(backend,auth): update tenant api to support deletedAt
BlairCurrey eebb862
docs: update with env vars
BlairCurrey 2212f88
fix(backend): dep container type
BlairCurrey aa03813
fix(localenv): docker compose config
BlairCurrey 8835a8c
fix(backend): add default header to api client
BlairCurrey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,3 +104,8 @@ export async function verifyApiSignature( | |
|
||
return verifyApiSignatureDigest(signature as string, ctx.request, config) | ||
} | ||
|
||
// Intended for Date strings like "2024-12-05T15:10:09.545Z" (e.g., from new Date().toISOString()) | ||
export function isValidDateString(date: string): boolean { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. small, but would be good to write a few tests for this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
return !isNaN(Date.parse(date)) | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
what do you think about calling this Tenant service instead?
Are you approaching this from this service being used for something else, for example?
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.
Yes, that was the idea. Figured it can serve the purpose of any service-to-service communication. No specific things in mind but if we did want to expose some other resource I dont imagine we'd want a new api just for that. And probably better to avoid renaming everything including this env var (since it would be breaking).