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

[QI2-1176] Update authentication with information retrieved from authconfig endpoint #348

Merged
merged 8 commits into from
Dec 31, 2024

Conversation

Mythir
Copy link
Contributor

@Mythir Mythir commented Dec 20, 2024

No description provided.

eliasKA
eliasKA previously approved these changes Dec 20, 2024
Copy link
Contributor

@eliasKA eliasKA 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 ✅

quantuminspire/cli/command_list.py Outdated Show resolved Hide resolved
quantuminspire/util/configuration.py Outdated Show resolved Hide resolved
tests/cli/test_command_list.py Outdated Show resolved Hide resolved
quantuminspire/util/configuration.py Outdated Show resolved Hide resolved
@oschusler
Copy link
Contributor

Could you please change the name of the PR? The commit message should reflect what the commit does. It doesn't do "auth config"

@eliasKA eliasKA changed the title [QI2-1176] Auth Config [QI2-1176] Update authentication with information retrieved from authconfig endpoint Dec 27, 2024
@eliasKA eliasKA force-pushed the feature/qi2-1176/auth-config branch from 0a42565 to b61a8d1 Compare December 31, 2024 06:05
@eliasKA eliasKA force-pushed the feature/qi2-1176/auth-config branch 2 times, most recently from a9ad9d3 to 854b6ab Compare December 31, 2024 08:23
@eliasKA eliasKA force-pushed the feature/qi2-1176/auth-config branch from 854b6ab to daa9897 Compare December 31, 2024 08:25
@eliasKA eliasKA requested a review from oschusler December 31, 2024 08:28
@eliasKA
Copy link
Contributor

eliasKA commented Dec 31, 2024

@oschusler had another look at test_configuration.py

    await settings.fetch_auth_settings(host)
    auth_settings = settings.auths[settings.default_host] if host is None else settings.auths[host]

This should not be an issue and does not relate to the change of dropping the DEFAULT_CONFIG in the file. Whats happening is the following:

We check the behaviour of fetch_auth_settings in two cases:

  1. When a host is provided (ie a user provides a host when doing a login)
  2. When a host is not provided (ie a user does not provide a host when doing a login) in this case it should default to the default_host: Url = "https://api.qi2.quantum-inspire.com" hardcoded in the settings

@eliasKA eliasKA merged commit 6d51796 into dev Dec 31, 2024
17 checks passed
@eliasKA eliasKA deleted the feature/qi2-1176/auth-config branch December 31, 2024 09:09
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.

3 participants