-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: opencraft-release/nutmeg.2
Are you sure you want to change the base?
feat: adds support for OAuth 2 client credentials auth in xapi #9
Conversation
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") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.') |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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.