Skip to content

Explicitly allow creation of MC without auth #249

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

JanCaha
Copy link
Contributor

@JanCaha JanCaha commented Jul 10, 2025

Use @_check_token on functions that require authorization and not on all requests towards server. That allows some requests like /config and functions related to it to be usable without user being logged.

Simplify function login() not to use custom request logic, but utilize post() function that is part of MerginClient.

Add tests cases.

@coveralls
Copy link

coveralls commented Jul 10, 2025

Pull Request Test Coverage Report for Build 16217492951

Details

  • 85 of 86 (98.84%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.4%) to 80.541%

Changes Missing Coverage Covered Lines Changed/Added Lines %
mergin/client.py 64 65 98.46%
Totals Coverage Status
Change from base Build 16073839998: 0.4%
Covered Lines: 3514
Relevant Lines: 4363

💛 - Coveralls

@tomasMizera
Copy link
Contributor

@JanCaha do we need to release this for the upcoming qgis-plugin release?

@JanCaha
Copy link
Contributor Author

JanCaha commented Jul 10, 2025

If we want to solve the SSO auth properly then quite likely yes. I will discuss it tommorow on standup with Stefanos

Copy link
Contributor

@MarcelGeo MarcelGeo left a comment

Choose a reason for hiding this comment

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

Just wondering if this has_auth will be valid after some actions.

I thinks _auth_params is mos important thing, as there is stored username and password.

we can ask also @wonder-sk for 👁️

@MarcelGeo MarcelGeo requested review from uclaros and wonder-sk July 11, 2025 09:25
Copy link
Contributor

@uclaros uclaros left a comment

Choose a reason for hiding this comment

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

Good job!
How about removing the leading _ now that check_token is used everywhere?

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.

5 participants