You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: simulator/README.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This script is designed solely for development and testing environments to mimic
8
8
9
9
## Features
10
10
11
-
-**Authentication**: Implements OpenID Connect Authorization Code flow with a local callback server.
11
+
-**Authentication**: Supports both interactive (browser-based) and non-interactive (direct grant) authentication flows.
12
12
-**Location Management**: Displays hospital structure and manages location hierarchies.
13
13
-**Patient Simulation**:
14
14
- Creates new patients in waiting room or admits them directly.
@@ -33,13 +33,25 @@ This script is designed solely for development and testing environments to mimic
33
33
KEYCLOAK_URL=http://localhost:8080
34
34
API_URL=http://localhost:8000/graphql
35
35
REALM=tasks
36
-
CLIENT_ID=tasks-web
36
+
USE_DIRECT_GRANT=false # Set to "true" for non-interactive authentication
37
+
CLIENT_ID=tasks-web # Automatically set to "admin-cli" when USE_DIRECT_GRANT=true
38
+
CLIENT_SECRET= # Optional, required if client is confidential
39
+
USERNAME= # Required when USE_DIRECT_GRANT=true
40
+
PASSWORD= # Required when USE_DIRECT_GRANT=true
37
41
INFLUXDB_URL=http://localhost:8086
38
42
INFLUXDB_TOKEN=tasks-token-secret
39
43
INFLUXDB_ORG=tasks
40
44
INFLUXDB_BUCKET=audit
41
45
```
42
46
47
+
### Authentication Modes
48
+
49
+
The simulator supports two authentication modes:
50
+
51
+
1.**Interactive (Default)**: Browser-based OAuth2 Authorization Code flow with a local callback server. This is the default mode and requires no additional configuration.
52
+
53
+
2.**Non-Interactive**: Set `USE_DIRECT_GRANT=true` along with `USERNAME` and `PASSWORD` environment variables. The simulator will authenticate using the direct grant (resource owner password credentials) flow without opening a browser. This mode is automatically enabled in Docker containers.
54
+
43
55
## Usage
44
56
45
57
### Local Development
@@ -93,7 +105,9 @@ The simulator is split into multiple modules:
93
105
94
106
## How It Works
95
107
96
-
1. Authenticates with Keycloak using OAuth2 Authorization Code flow
0 commit comments