Skip to content
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

feat: adds support for OAuth 2 client credentials auth in xapi #9

Open
wants to merge 6 commits into
base: opencraft-release/nutmeg.2
Choose a base branch
from

Conversation

tecoholic
Copy link
Member

The xAPI client currently only supports sending events using the HTTP Basic authentication. This commit expands the authentication method to also include OAuth 2.0 Client Credentials flow.

tecoholic and others added 3 commits September 1, 2023 17:39
The xAPI client currently only supports sending events using the HTTP
Basic authentication. This commit expands the authentication method to
also include OAuth 2.0 Client Credentials flow.
auth_url = models.URLField(
blank=True,
null=True,
help_text=_("URL to use for authentication. Eg., Token URL for OAuth")
Copy link
Member

Choose a reason for hiding this comment

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

Should this point to the LMS OAuth2 (e.g., localhost:18000/oauth2/access_token) or directly to the edx-enterprise service? It would be good to clarify this here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah. I think I have badly explained this PR. The OAuth URL would be from an external LRS service. For example, edCast uses <instance-hostname>/api/lrs/v1/xapi/oauth2/token.

verbose_name=_('OAuth scope'),
blank=True,
null=True,
help_text=_('The "scope" to pass for OAuth authentication.')
Copy link
Member

Choose a reason for hiding this comment

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

What scopes are available here? Could we list them?

Copy link
Member Author

Choose a reason for hiding this comment

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

This would be specified by the LRS as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants