lp:canonical-identity-provider

Get this repository:
git clone https://git.not.enabled/canonical-identity-provider
Members of Ubuntu One PQM Team can upload to this repository. Log in for directions.

Branches

Name Last Modified Last Commit
master 2023-09-25 09:23:38 UTC
Fix preference and (add) enforcing option for canonical email

Author: John Paraskevopoulos
Author Date: 2023-09-25 09:23:38 UTC

Fix preference and (add) enforcing option for canonical email

- Add enforce_canonical_email in OpenIDRPConfig model
- Add enforce_canonical_email migration
- Moves `get_canonical_email` and `is_canonical_email` to utils module.
Main reason for this is that this is where other functions like
`is_canonicalish_email` and `is_long_form_email` recide that are used
for OpenID authentication.
Also removes `is_long_form_email` and `is_canonicalish_email` from the
processors module since they are identical to the ones in utils module
- Adds new `get_suitable_email` function to take care of what email should
be returned to OpenID transactions. It calls `get_canonical_email`
function which is somewhat similar in behavior to what
`_get_suitable_email` does in views/server module. Also makes use of the
introduced `enforce_canonical_email`. Main reason for this is to
properly serve the `prefer_canonical_email` setting on OpenIDRPConfig
model. Now if the `prefer_canonical_email` is set (and not the enforcing
one), if the user doesn't have a canonical email, we will simply return
the currently preferred one. Whereas until now, in such scenarios we
were returning `None` instead.
- Replaces the `_get_suitable_email` function with the new one in utils
module which fixes and issue with the `prefer_canonical_email` setting
and also makes use of the `enforce_canonical_email` setting
- Switches to using the `get_suitable_email` function instead of the
`get_canonical_email` one with the caveat that it uses the fixed kwarg
`enforce_canonical` as True. This opens the opportunity to add more
options (such as "prefer_canonical_email") in SAML as well
- Fixes SN-2008

Merged from https://code.launchpad.net/~quantifics/canonical-identity-provider/+git/canonical-identity-provider/+merge/451884

11 of 1 result
This repository contains Public information 
Everyone can see this information.