Phase 4 complete
This commit is contained in:
parent
0cc099c00c
commit
66f15b49b2
9 changed files with 710 additions and 37 deletions
|
|
@ -93,20 +93,73 @@ Note these endpoints (you'll need them for frontend configuration):
|
|||
|
||||
2. You should see a JSON response with all OIDC endpoints
|
||||
|
||||
## Step 6: Create a Test User (Optional)
|
||||
## Step 6: Create a Test User
|
||||
|
||||
Create a regular user for manual browser testing.
|
||||
|
||||
1. Go to **Directory** > **Users**
|
||||
|
||||
2. Click **Create**
|
||||
|
||||
3. Fill in user details:
|
||||
- Username: `testuser`
|
||||
- Name: `Test User`
|
||||
- Email: `test@example.com`
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| Username | `kaboottest` |
|
||||
| Name | `Kaboot Test` |
|
||||
| Email | `kaboottest@test.com` |
|
||||
|
||||
4. After creation, click on the user and go to the **Credentials** tab
|
||||
|
||||
5. Click **Set password** to create a password
|
||||
5. Click **Set password** and set it to `kaboottest`
|
||||
|
||||
6. **Bind the user to the Kaboot application**:
|
||||
- Go to **Applications** > **Applications** > **Kaboot**
|
||||
- Click the **Policy / Group / User Bindings** tab
|
||||
- Click **Bind existing user**
|
||||
- Select `kaboottest` and click **Bind**
|
||||
|
||||
## Step 7: Create a Service Account for API Testing
|
||||
|
||||
Create a service account that can obtain tokens programmatically for automated tests.
|
||||
|
||||
1. Go to **Directory** > **Users**
|
||||
|
||||
2. Click **Create Service Account**
|
||||
|
||||
3. Fill in details:
|
||||
| Field | Value |
|
||||
|-------|-------|
|
||||
| Username | `kaboot-test-service` |
|
||||
| Create group | Unchecked |
|
||||
|
||||
4. Click **Create**
|
||||
|
||||
5. **Create an App Password** for the service account:
|
||||
- Click on the newly created `kaboot-test-service` user
|
||||
- Go to the **App passwords** tab
|
||||
- Click **Create App Password**
|
||||
- Name it `api-tests`
|
||||
- Copy the generated password (you won't see it again!)
|
||||
|
||||
6. **Bind the service account to the Kaboot application**:
|
||||
- Go to **Applications** > **Applications** > **Kaboot**
|
||||
- Click the **Policy / Group / User Bindings** tab
|
||||
- Click **Bind existing user**
|
||||
- Select `kaboot-test-service` and click **Bind**
|
||||
|
||||
7. **Save credentials to `server/.env.test`**:
|
||||
```bash
|
||||
TEST_USERNAME=kaboot-test-service
|
||||
TEST_PASSWORD=<paste-app-password-here>
|
||||
```
|
||||
|
||||
8. **Verify token generation works**:
|
||||
```bash
|
||||
cd server
|
||||
npm run test:get-token
|
||||
```
|
||||
|
||||
You should see "Token obtained successfully" and the access token printed.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue