* fix: Redirect non-enterprise SAML to authn MFE
The original request was that enterprise users with tpa hint and SAML should not be redirected to MFE. The current condition also excludes regular non-enterprise users with SAML authentication from the MFE.
* test: Add test for enterprise SAML authentication MFE redirection logic
This test validates the conditional redirection to the authentication
microfrontend (MFE) for enterprise and SAML authentication scenarios.
The test covers different combinations of:
- Enterprise customer presence
- Third-party authentication provider
- SAML provider status
- Redirection setting
Ensures that enterprise customers with SAML providers are not redirected
to the authentication MFE, while other scenarios follow the standard
redirection rules.
* fix: change spaced between line codes in test_logistration.py
---------
Co-authored-by: Andrés González <andres@aulasneo.com>
- Introduced `remove_special_characters_from_name` and `generate_username_suggestions` functions to enhance username handling.
- Added comprehensive test cases for username generation, including ASCII validation and uniqueness checks.
- Implemented tests for special character removal and suggestion generation based on various input scenarios, including edge cases.
- Updated `generate_username_suggestions` function to include validation for non-ASCII characters.
- Improved function documentation to clarify arguments, return types, and username generation logic.
- Added type hints for better code clarity and maintainability.
* feat: add more authentication information to swagger
* updates the `docs-settings` to make the generated swagger
`securityDefinitions` include both JWT and CSRF methods, as well as
basic. A few linter fixes happened as a side effect.
* Put in wordier descriptions for all three, since we don't have great
shared documentation about authn/authz.
* Added CSRF to `login_session`, which also serves as a proof of concept
for other endpoits
* Also regenerated the swagger doc, which picked up some extra changes.
Generated swagger now has help and allows extra auth methods so some
preveiously unusable endpoints can be hit.
FIXES: APER-3554
This repo is no longer using USE-JWT-COOKIE header,
since it has the required edx-drf-extensions>10.2.0,
where it was fully removed.
This removes all uses of the header, except updating
CORS_ALLOW_HEADERS, which can't be done before all
MFEs and other callers stop sending the header.
See "[DEPR]: USE-JWT-COOKIE header" for more details:
- https://github.com/openedx/edx-drf-extensions/issues/371
This repo is no longer using USE-JWT-COOKIE header,
since it has the required edx-drf-extensions>10.2.0,
where it was fully removed.
This is final clean-up for this repo.
See "[DEPR]: USE-JWT-COOKIE header" for more details:
- https://github.com/openedx/edx-drf-extensions/issues/371
* fix: convert totalRegistrationTime to snake case
Description:
Convert totalRegistrationTime to snake case
VAN-1816
* fix: link issue
---------
Co-authored-by: Ahtesham Quraish <ahtesham.quraish@192.168.1.4>
Co-authored-by: Syed Sajjad Hussain Shah <ssajjad@2u.com>
This regex is used for checking if a field contains a URL. We did this because we didn't want URLs in a user's "full name".
The capturing groups on the current regex are not needed to capture a URL. This commit simplifies and makes the regex stricter by banning the character combination "://".