Skip to content

Commit

Permalink
Merge pull request #78 from jgwerner/docs/fix-examples
Browse files Browse the repository at this point in the history
Update helm chart examples
  • Loading branch information
consideRatio authored Nov 15, 2021
2 parents f0fd9b9 + ca53c40 commit 50688aa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

- Add LTI 1.3 authenticator and config handler [#73](https://github.com/jupyterhub/ltiauthenticator/pull/73) ([@jgwerner](https://github.com/jgwerner))

## Contributors to this release
#### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyterhub/ltiauthenticator/graphs/contributors?from=2021-09-01&to=2021-11-15&type=c))

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ Examples:

#### Releases

Please refer to the documentation within JupyterHub's [RELEASE.md](https://github.com/jupyterhub/jupyterhub/blob/main/RELEASE.md).
Please refer to the documentation within this repo's [RELEASE.md](https://github.com/jupyterhub/ltiauthenticator/blob/main/RELEASE.md).
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ hub:
# Additional documentation related to authentication and authorization available at
# https://zero-to-jupyterhub.readthedocs.io/en/latest/administrator/authentication.html
JupyterHub:
authenticator_class: lti
authenticator_class: ltiauthenticator.LTIAuthenticator # LTI 1.1
LTI11Authenticator:
consumers: { "client-key": "client-secret" }
username_key: "lis_person_contact_email_primary"
Expand Down Expand Up @@ -306,7 +306,7 @@ You may customize these settings with the `config_*` configuration options descr

#### Custom Configuration with JupyterHub's Helm Chart

If you are running **JupyterHub within a Kubernetes Cluster**, deployed using helm, you need to supply the client key & shared secret with the `lti.consumers` key. The example below also demonstrates how customize the `lti.username_key` to set the user's email as the JupyterHub username and the `lti.config_icon` to define a custom external tool icon when using the LTI 1.1 configuration XML endpoint:
If you are running **JupyterHub within a Kubernetes Cluster**, deployed using helm, you need to supply the LTI 1.3 (OIDC/OAuth2) endpoints. The example below also demonstrates how customize the `lti13.username_key` to set the user's give name:

```yaml
# Custom config for JupyterHub's helm chart
Expand All @@ -315,15 +315,22 @@ hub:
# Additional documentation related to authentication and authorization available at
# https://zero-to-jupyterhub.readthedocs.io/en/latest/administrator/authentication.html
JupyterHub:
authenticator_class: lti
LTI11Authenticator:
consumers: { "client-key": "client-secret" }
username_key: "lis_person_contact_email_primary"
config_icon: "https://my.static.assets/img/icon.jpg"
authenticator_class: ltiauthenticator.lti13.auth.LTI13Authenticator
LTI13Authenticator:
# Use an LTI 1.3 claim to set the username. You can use and LTI 1.3 claim that
# identifies the user, such as email, last_name, etc.
username_key: "given_name"
# The LTI 1.3 authorization url
authorize_url: "https://canvas.instructure.com/api/lti/authorize_redirect"
# The external tool's client id as represented within the platform (LMS)
# Note: the client id is not required by some LMS's for authentication.
client_id: "125900000000000329"
# The LTI 1.3 endpoint url, also known as the OAuth2 callback url
endpoint: "http://localhost:8000/hub/oauth_callback"
# The LTI 1.3 token url used to validate JWT signatures
token_url: "https://canvas.instructure.com/login/oauth2/token"
```
_Note_: in the helm chart example configuration above `hub.config.LTI11Authenticator.username_key: lis_person_contact_email_primary` is equivalent to the standard JupyterHub configuration using `jupyterhub_config.py` with `c.LTI11Authenticator.username_key = lis_person_contact_email_primary`.

#### Configuration of LTI 1.3 with the Learning Management System
#### Canvas
Expand Down

0 comments on commit 50688aa

Please sign in to comment.