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(authentication): add support to persist sessions and flows in database #218

Merged
merged 7 commits into from
Apr 14, 2023

Conversation

Chief-Rishab
Copy link
Member

@Chief-Rishab Chief-Rishab commented Apr 10, 2023

  • Add support to save user sessions and flows in the postgres database
  • Documentation
    • Update API and CLI reference
    • Update server configurations

@coveralls
Copy link

coveralls commented Apr 10, 2023

Pull Request Test Coverage Report for Build 4691795498

  • 0 of 208 (0.0%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.2%) to 54.821%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/serve.go 0 2 0.0%
internal/api/v1beta1/authenticate.go 0 2 0.0%
internal/store/postgres/session.go 0 9 0.0%
internal/store/postgres/flow.go 0 10 0.0%
internal/store/postgres/flow_repository.go 0 89 0.0%
internal/store/postgres/session_repository.go 0 96 0.0%
Totals Coverage Status
Change from base Build 4665802449: -1.2%
Covered Lines: 4702
Relevant Lines: 8577

💛 - Coveralls

Base automatically changed from authn-session to main April 11, 2023 03:37
@kushsharma
Copy link
Member

@Chief-Rishab can you rebase this with main, I'll review it after

@Chief-Rishab
Copy link
Member Author

Chief-Rishab commented Apr 11, 2023

@kushsharma this PR is ready for review now

core/authenticate/authenticate.go Outdated Show resolved Hide resolved
internal/store/postgres/session_repository.go Outdated Show resolved Hide resolved
docs/docs/tour/setup-server.md Show resolved Hide resolved
@@ -0,0 +1,8 @@
CREATE TABLE IF NOT EXISTS flows(
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
method varchar,
Copy link
Member

Choose a reason for hiding this comment

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

instead of varchar can we use text

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Yes they are same, I thought in rest of the migrations we are using text so I thought we may want to keep it consistent, I just checked looks like we actually use varchar. Should be fine then.

@kushsharma kushsharma merged commit 3a05af9 into main Apr 14, 2023
3 checks passed
@kushsharma kushsharma deleted the rishab branch April 14, 2023 04:07
Chief-Rishab added a commit that referenced this pull request Apr 15, 2023
…tabase (#218)

* feat(authentication): persists sessions and flows in db

* doc: update cli and api references

* docs: update server configurations

* chore: add changes from suggestion

* chore: fix lint error

* chore: add flow model for postgres

* chore: add changes from suggestions
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