documentation
This commit is contained in:
parent
5f508371c7
commit
39c97abb21
54
README.rst
54
README.rst
@ -17,6 +17,24 @@ working on your Open edX installation.
|
|||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
An example implementation for an Open edX installation named https://web.stepwisemath.ai
|
||||||
|
|
||||||
|
1. add this package to your project's requiremets
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
include this repo in your project's requiremets.txt, or install it from the command line.
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
cd path/to/your/virtual/environment
|
||||||
|
source path/to/venv/bin/activate
|
||||||
|
pip install https://github.com/lpm0073/wp-oauth-backend
|
||||||
|
|
||||||
|
2. subclass WPOpenEdxOAuth2
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Subclass wp_oauth_backend.wp_oauth.WPOpenEdxOAuth2, and configure for your Wordpress oauth provider.
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
from wp_oauth_backend.wp_oauth import WPOpenEdxOAuth2
|
from wp_oauth_backend.wp_oauth import WPOpenEdxOAuth2
|
||||||
@ -37,29 +55,8 @@ Usage
|
|||||||
# might clean this up for you, but i'm not 100% certain of that.
|
# might clean this up for you, but i'm not 100% certain of that.
|
||||||
BASE_URL = "https://stepwisemath.ai"
|
BASE_URL = "https://stepwisemath.ai"
|
||||||
|
|
||||||
|
3. configure your Open edX lms application
|
||||||
Open edX Setup
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
--------------
|
|
||||||
|
|
||||||
.. image:: doc/django-admin-1.png
|
|
||||||
:width: 100%
|
|
||||||
:alt: Open edX Django Admin Add Provider Configuration (OAuth)
|
|
||||||
|
|
||||||
.. image:: doc/django-admin-2.png
|
|
||||||
:width: 100%
|
|
||||||
:alt: Open edX Django Admin Add Provider Configuration (OAuth)
|
|
||||||
|
|
||||||
|
|
||||||
General Python/Django
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
include this repo in your project's requiremets.txt, or install it from the command line.
|
|
||||||
|
|
||||||
.. code-block:: shell
|
|
||||||
|
|
||||||
cd path/to/your/project
|
|
||||||
source path/to/venv/bin/activate
|
|
||||||
pip install https://github.com/StepwiseMath/wp-oauth-backend
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
.. code-block:: yaml
|
||||||
|
|
||||||
@ -90,6 +87,17 @@ add these settings to django.conf:
|
|||||||
* - REDIRECT_URI
|
* - REDIRECT_URI
|
||||||
- https://web.stepwisemath.ai/auth/complete/stepwisemath-oauth
|
- https://web.stepwisemath.ai/auth/complete/stepwisemath-oauth
|
||||||
|
|
||||||
|
4. Configure a new Oauth2 client from the lms Django Admin console
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. image:: doc/django-admin-1.png
|
||||||
|
:width: 100%
|
||||||
|
:alt: Open edX Django Admin Add Provider Configuration (OAuth)
|
||||||
|
|
||||||
|
.. image:: doc/django-admin-2.png
|
||||||
|
:width: 100%
|
||||||
|
:alt: Open edX Django Admin Add Provider Configuration (OAuth)
|
||||||
|
|
||||||
|
|
||||||
Cookiecutter openedx_devops build
|
Cookiecutter openedx_devops build
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
from .wp_oauth import WPOpenEdxOAuth2
|
|
||||||
|
|
||||||
|
|
||||||
class StepwiseMathWPOAuth2(WPOpenEdxOAuth2):
|
|
||||||
|
|
||||||
# This defines the backend name and identifies it during the auth process.
|
|
||||||
# The name is used in the URLs /login/<backend name> and /complete/<backend name>.
|
|
||||||
#
|
|
||||||
# This is the string value that will appear in the LMS Django Admin
|
|
||||||
# Third Party Authentication / Provider Configuration (OAuth)
|
|
||||||
# setup page drop-down box titled, "Backend name:", just above
|
|
||||||
# the "Client ID:" and "Client Secret:" fields.
|
|
||||||
name = "stepwisemath-oauth"
|
|
||||||
|
|
||||||
# note: no slash at the end of the base url. Python Social Auth
|
|
||||||
# might clean this up for you, but i'm not 100% certain of that.
|
|
||||||
BASE_URL = "https://stepwisemath.ai"
|
|
Loading…
Reference in New Issue
Block a user