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
Credential handling for password-less learner certificate generation #8239
Credential handling for password-less learner certificate generation #8239
Conversation
# add facility so `FacilityUserBackend` can validate | ||
userargs = { | ||
FacilityUser.USERNAME_FIELD: username, | ||
FACILITY_CREDENTIAL_NAME: dataset_id, |
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.
This is being passed as the facility id, but is the dataset_id
- is this not facility.dataset_id
or is the variable name here just confusing?
return response.url.rstrip("/").replace("api/public/info", "") | ||
|
||
# return (scheme, netloc) of url | ||
return urlunparse(parsed_url[:2]) |
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.
Ah yes, I can see how that caused an issue!
# add facility so `FacilityUserBackend` can validate | ||
userargs = { | ||
FacilityUser.USERNAME_FIELD: username, | ||
FACILITY_CREDENTIAL_KEY: facility_id, |
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.
Ahah, yes that answers my question!
Summary
user
sync command argument to certificate authentication (@jredrejo)References
See issues tracked in Notion
Reviewer guidance
facility
credential argument to Kolibri's auth backend:$ INTEGRATION_TEST=1 pytest -k "test_learner_password" kolibri/core/auth/test/test_morango_integration.py
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)