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: add JWT support #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

feat: add JWT support #109

wants to merge 1 commit into from

Conversation

bra-i-am
Copy link
Contributor

@bra-i-am bra-i-am commented Sep 25, 2024

Description

This PR allows you to make requests using a JWT

How to test

  1. Install the plugin with these changes
  2. Install the Forum Tutor Plugin with tutor plugins install forum && tutor plugins enable forum
  3. Create a new application from http://local.edly.io:8000/admin/oauth2_provider/application/. Associate a user with sufficient permissions and add to the Redirect uris field: http://local.edly.io:8000/
  4. Add the following setting to the tenant you are using:
"EOX_TAGGING_DEFINITIONS": [
       {
           "access": "public",
           "owner_object": "site",
           "tag_type": "subscription_level",
           "validate_target_object": "user"
       },
       {
           "access": "public",
           "owner_object": "site",
           "tag_type": "subscription_level_enrollment",
           "validate_target_object": "courseenrollment"
       },
       {
           "access": "public",
           "owner_object": "site",
           "tag_type": "subscription_level_course",
           "validate_target_object": "OpaqueKeyProxyModel"
       },
       {
           "access": "public",
           "owner_object": "user",
           "tag_type": "subscription_level_user",
           "validate_target_object": "user"
       }
   ]

Note

For more information about the eox-tagging configuration please follow the Test Cases Doc

  1. Open Postman and import the Collection and Environment at docs/resources adding the required env info according to the previously created application
  2. Generate a JWT using the Authorization POST route from the collection; the generated token will be added automatically to the environment
  3. Run the endpoints from the collection previously imported following the ascending numeration

JIRA ISSUE AP-1111

* docs: add Postman collection and env variables references
Copy link
Contributor

@magajh magajh left a comment

Choose a reason for hiding this comment

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

Thank you @bra-i-am!

"_postman_variable_scope": "environment",
"_postman_exported_at": "2024-09-25T22:23:21.442Z",
"_postman_exported_using": "Postman/11.13.1"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing blank line at the end of this file

"response": []
}
]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing blank line

djangorestframework<3.15.2

# The latest version that works with Django 3.2
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# The latest version that works with Django 3.2
# Latest version compatible with Django 3.2

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.

2 participants