Skip to content

Makes the username configurable via settings & small tweaks to method args - #1

Open
Chris-Thornton-Harvard wants to merge 2 commits into
feature/add_authentication_backendfrom
thornton/auth_tweaks
Open

Makes the username configurable via settings & small tweaks to method args#1
Chris-Thornton-Harvard wants to merge 2 commits into
feature/add_authentication_backendfrom
thornton/auth_tweaks

Conversation

@Chris-Thornton-Harvard

Copy link
Copy Markdown

Fixes a couple of args in methods that were expecting 2 positional arguments but were only receiving 1.

Adds support for an optional LTI_TOOL settings object that can have a use_person_sourcedid boolean.
If present and True, use the SIS ID of the user as the username otherwise the users sub value will be used.

@haydn9000 haydn9000 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@cmurtaugh

Copy link
Copy Markdown

I ended up re-working the middleware and backend classes to be based on the auth classes from Django 4.2 instead of Django 5.2 and that created a bunch of conflicts with this branch. So - I just manually moved these changes over to the add_authentication_backend branch.

@cmurtaugh

Copy link
Copy Markdown

I also added a get_username(request) function; if someone wanted to use something other than the sub or person_sourcedid values, they could just subclass the middleware class and override get_username().

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