-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! 📝(project) add a ralph lrs tutorial
- Loading branch information
Showing
8 changed files
with
84 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ To create a new user credentials, Ralph CLI provides a dedicated command: | |
=== "Docker Compose" | ||
|
||
```bash | ||
docker compose run --rm ralph-lrs \ | ||
docker compose run --rm lrs \ | ||
bin/ralph auth \ | ||
--username janedoe \ | ||
--password supersecret \ | ||
|
@@ -59,7 +59,7 @@ The credentials file can also be created manually. It is expected to be a valid | |
specified by the `RALPH_AUTH_FILE` configuration value. | ||
|
||
!!! tip | ||
By default, Ralph LRS will look for the `auth.json` file in the application directory (see [click | ||
By default, Ralph LRS looks for the `auth.json` file in the application directory (see [click | ||
documentation for | ||
details](https://click.palletsprojects.com/en/8.1.x/api/#click.get_app_dir)). | ||
|
||
|
@@ -78,12 +78,12 @@ The expected format is a list of entries (JSON objects) each containing: | |
## Making a GET request | ||
|
||
After changing the `docker-compose.yml` file as follow: | ||
``` yaml hl_lines="10" | ||
``` yaml hl_lines="10" title="docker-compose.yml" | ||
version: "3.9" | ||
|
||
services: | ||
|
||
ralph-lrs: | ||
lrs: | ||
image: fundocker/ralph:latest | ||
environment: | ||
- RALPH_APP_DIR: /app/.ralph | ||
|
@@ -102,11 +102,20 @@ services: | |
and running the Ralph LRS with: | ||
```bash | ||
docker compose up -d | ||
docker compose up -d lrs | ||
``` | ||
|
||
we can try to make a request to the `whoami` endpoint again, but this time sending our username and password through Basic Auth: | ||
|
||
=== "curl" | ||
|
||
``` | ||
curl --user janedoe:supersecret http://localhost:8100/whoami | ||
``` | ||
``` console | ||
{"agent":{"mbox":"mailto:[email protected]","objectType":"Agent","name":null},"scopes":["janedoe_scope"]} | ||
``` | ||
|
||
=== "HTTPie" | ||
|
||
``` | ||
|
@@ -130,12 +139,3 @@ we can try to make a request to the `whoami` endpoint again, but this time sendi | |
] | ||
} | ||
``` | ||
|
||
=== "curl" | ||
|
||
``` | ||
curl --user janedoe:supersecret http://localhost:8100/whoami | ||
``` | ||
``` console | ||
{"agent":{"mbox":"mailto:[email protected]","objectType":"Agent","name":null},"scopes":["janedoe_scope"]} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters