openwisp-radius
openwisp-radius copied to clipboard
Issues/523 saml auth create email address objects
Checklist
- [x] I have read the OpenWISP Contributing Guidelines.
- [x] I have manually tested the changes proposed in this pull request.
- [x] I have written new test cases for new code and/or updated existing tests for changes to existing code.
- [ ] I have updated the documentation.
Reference to Existing Issue
Closes #523 .
Description of Changes
- Check if the NameID is an email and use it as the user's email.
- If NameID is not an email, check for the 'email' attribute in the SAML response.
- Create an EmailAddress object using the retrieved email.
Screenshot
coverage: 98.648% (+0.003%) from 98.645% when pulling 05f17e9fc7465ca45684843f3d52690f7fba39ac on kaushikaryan04:issues/523-SAML-auth-create-email-address-objects into dc8580f94bba8da857551d34d523564331f9633f on openwisp:master.
Follow up:
- https://github.com/openwisp/ansible-openwisp2/issues/500
- https://github.com/openwisp/docker-openwisp/issues/392