Skip to content

Commit

Permalink
Update auth login path.
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Aug 25, 2024
1 parent 557ced6 commit 253481b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ service.

```terminal:execute
command: |-
ADMIN_ACCESS_TOKEN=$(curl --silent -X POST http://educates-api.hub.{{< param session_name >}}.{{< param ingress_domain >}}/login -H "Content-Type: application/json" -d '{"username": "admin", "password": "super-secret"}' | jq -r -e .access_token) && echo $ADMIN_ACCESS_TOKEN
ADMIN_ACCESS_TOKEN=$(curl --silent -X POST http://educates-api.hub.{{< param session_name >}}.{{< param ingress_domain >}}/auth/login -H "Content-Type: application/json" -d '{"username": "admin", "password": "super-secret"}' | jq -r -e .access_token) && echo $ADMIN_ACCESS_TOKEN
```

Presuming access is granted, with this command the access token will be captured
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To login the user for the first custom front end web portal run:

```terminal:execute
command: |-
PORTAL_1_ACCESS_TOKEN=$(curl --silent -X POST http://educates-api.hub.{{< param session_name >}}.{{< param ingress_domain >}}/login -H "Content-Type: application/json" -d '{"username": "custom-portal-1", "password": "secret-1"}' | jq -r -e .access_token) && echo $PORTAL_1_ACCESS_TOKEN
PORTAL_1_ACCESS_TOKEN=$(curl --silent -X POST http://educates-api.hub.{{< param session_name >}}.{{< param ingress_domain >}}/auth/login -H "Content-Type: application/json" -d '{"username": "custom-portal-1", "password": "secret-1"}' | jq -r -e .access_token) && echo $PORTAL_1_ACCESS_TOKEN
```

The range of API endpoints a user with the `tenant` role has access to is much
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To test access using the admin user, login using the command:

```terminal:execute
command: |-
ACCESS_TOKEN=$(curl --silent -X POST http://educates-api.{{< param session_name >}}.{{< param ingress_domain >}}/login -H "Content-Type: application/json" -d '{"username": "admin", "password": "super-secret"}' | jq -r -e .access_token) && echo $ACCESS_TOKEN
ACCESS_TOKEN=$(curl --silent -X POST http://educates-api.{{< param session_name >}}.{{< param ingress_domain >}}/auth/login -H "Content-Type: application/json" -d '{"username": "admin", "password": "super-secret"}' | jq -r -e .access_token) && echo $ACCESS_TOKEN
```

Presuming access is granted, with this command the access token will be captured
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ role, instead of the admin user.

```terminal:execute
command: |-
ACCESS_TOKEN=$(curl --silent -X POST http://educates-api.{{< param session_name >}}.{{< param ingress_domain >}}/login -H "Content-Type: application/json" -d '{"username": "custom-portal", "password": "my-secret"}' | jq -r -e .access_token) && echo $ACCESS_TOKEN
ACCESS_TOKEN=$(curl --silent -X POST http://educates-api.{{< param session_name >}}.{{< param ingress_domain >}}/auth/login -H "Content-Type: application/json" -d '{"username": "custom-portal", "password": "my-secret"}' | jq -r -e .access_token) && echo $ACCESS_TOKEN
```

A user with the tenant role has access to two main endpoints via the REST API.
Expand Down

0 comments on commit 253481b

Please sign in to comment.