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

feat: allow for postgres and http functions on each extensibility point #1528

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

J0
Copy link
Contributor

@J0 J0 commented Apr 11, 2024

What kind of change does this PR introduce?

After this change, users can opt to use either Postgres or HTTP functions on each extensibility/extension point. From an implementation standpoint, all new extension points must support both HTTP and Postgres functions

@coveralls
Copy link

coveralls commented Apr 12, 2024

Pull Request Test Coverage Report for Build 8689095510

Details

  • 62 of 98 (63.27%) changed or added relevant lines in 7 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.4%) to 65.55%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/api/mail.go 7 8 87.5%
internal/hooks/auth_hooks.go 3 5 60.0%
internal/api/hooks.go 44 77 57.14%
Files with Coverage Reduction New Missed Lines %
internal/hooks/auth_hooks.go 1 54.55%
internal/api/hooks.go 5 61.73%
Totals Coverage Status
Change from base Build 8688354864: 0.4%
Covered Lines: 8138
Relevant Lines: 12415

💛 - Coveralls

J0 added a commit that referenced this pull request Apr 12, 2024
## What kind of change does this PR introduce?

In support of the use of HTTP Hook with Custom Access Token Extension
Point.

We need to take in a request in order to support the Custom Access Token
Hook. We use the request in the Custom access hook depends on the
request to fetch the global logger. We refactor `generateAccessToken`
and a wrapping method, `issueRefreshToken`, to take in a request to
support this.

We also add a dummy request to the tests to support this change.
Supports #1528 - branched out as a separate PR so as not to bloat the
main PR with peripheral changes.
@J0 J0 force-pushed the j0/allow_postgres_and_http_on_extensibility_point branch from 88ba493 to 7b60d67 Compare April 12, 2024 08:21
internal/api/hooks.go Outdated Show resolved Hide resolved
@J0 J0 marked this pull request as ready for review April 15, 2024 10:51
@J0 J0 requested a review from a team as a code owner April 15, 2024 10:51
Copy link
Contributor

@hf hf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Would just add Content-Type check on the HTTP response from the hook. If it's not JSON, throw an error.

@J0 J0 force-pushed the j0/allow_postgres_and_http_on_extensibility_point branch from 4311d7e to 991ffa2 Compare April 15, 2024 11:59
@J0 J0 force-pushed the j0/allow_postgres_and_http_on_extensibility_point branch from 991ffa2 to f6f9b65 Compare April 15, 2024 12:02
@J0 J0 merged commit 348a1da into master Apr 15, 2024
2 checks passed
@J0 J0 deleted the j0/allow_postgres_and_http_on_extensibility_point branch April 15, 2024 12:34
hf pushed a commit that referenced this pull request Apr 25, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.150.0](v2.149.0...v2.150.0)
(2024-04-25)


### Features

* add support for Azure CIAM login
([#1541](#1541))
([1cb4f96](1cb4f96))
* add timeout middleware
([#1529](#1529))
([f96ff31](f96ff31))
* allow for postgres and http functions on each extensibility point
([#1528](#1528))
([348a1da](348a1da))
* merge provider metadata on link account
([#1552](#1552))
([bd8b5c4](bd8b5c4))
* send over user in SendSMS Hook instead of UserID
([#1551](#1551))
([d4d743c](d4d743c))


### Bug Fixes

* return error if session id does not exist
([#1538](#1538))
([91e9eca](91e9eca))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

None yet

3 participants