1919| ` HOST ` | ` 0.0.0.0 ` | Bind address |
2020| ` PORT ` | ` 80 ` | Listen port |
2121
22+ ### Authentication Configuration
23+
24+ Shared credentials used across all authentication methods.
25+
26+ | Variable | Default | Description |
27+ | ------------------------ | ---------- | -------------------------------------------------------------- |
28+ | ` AUTH_ALLOWED_USERNAME ` | ` testuser ` | Username for Basic Auth, Bearer Token, and OAuth2/OIDC flows |
29+ | ` AUTH_ALLOWED_PASSWORD ` | ` testpass ` | Password for Basic Auth, Bearer Token, and OAuth2/OIDC flows |
30+
2231### OAuth2/OIDC Configuration
2332
2433Configure OAuth2/OIDC server behavior with these environment variables:
2534
2635** OAuth2 Configuration (shared across all flows):**
2736
28- | Variable | Default | Description |
29- | ---------------------------- | ----------------------- | ---------------------------------------------- |
30- | ` AUTH_ALLOWED_CLIENT_ID ` | (empty - accept any) | Allowed client_id for validation (empty = any) |
31- | ` AUTH_ALLOWED_CLIENT_SECRET ` | (empty - public client) | Required client_secret (empty = not required) |
32- | ` AUTH_SUPPORTED_SCOPES ` | ` openid,profile,email ` | Comma-separated list of supported scopes |
33- | ` AUTH_TOKEN_EXPIRY ` | ` 3600 ` | Access token expiry in seconds |
37+ | Variable | Default | Description |
38+ | ---------------------------- | ----------------------------------------------------------------- | ---------------------------------------------- |
39+ | ` AUTH_ALLOWED_CLIENT_ID ` | (empty - accept any) | Allowed client_id for validation (empty = any) |
40+ | ` AUTH_ALLOWED_CLIENT_SECRET ` | (empty - public client) | Required client_secret (empty = not required) |
41+ | ` AUTH_SUPPORTED_SCOPES ` | ` openid,profile,email ` | Comma-separated list of supported scopes |
42+ | ` AUTH_TOKEN_EXPIRY ` | ` 3600 ` | Access token expiry in seconds |
43+ | ` AUTH_ALLOWED_GRANT_TYPES ` | ` authorization_code,client_credentials,password,refresh_token ` | Comma-separated list of allowed grant types |
3444
3545** Authorization Code Flow Configuration:**
3646
@@ -41,12 +51,6 @@ Configure OAuth2/OIDC server behavior with these environment variables:
4151| ` AUTH_CODE_VALIDATE_REDIRECT_URI ` | ` false ` | Enable redirect_uri validation |
4252| ` AUTH_CODE_ALLOWED_REDIRECT_URIS ` | (empty - allow all) | Comma-separated redirect URI patterns |
4353
44- ** OIDC Configuration (id_token specific):**
45-
46- | Variable | Default | Description |
47- | ------------------------- | ------- | ---------------------------------------------- |
48- | ` OIDC_ENABLE_JWT_SIGNING ` | ` false ` | Enable JWT signing (currently not implemented) |
49-
5054** Example Configuration:**
5155
5256``` bash
@@ -55,6 +59,7 @@ export AUTH_ALLOWED_CLIENT_ID=my-app-client-id
5559export AUTH_ALLOWED_CLIENT_SECRET=my-app-secret
5660export AUTH_SUPPORTED_SCOPES=openid,profile,email,custom_scope
5761export AUTH_TOKEN_EXPIRY=3600
62+ export AUTH_ALLOWED_GRANT_TYPES=authorization_code,client_credentials,password,refresh_token
5863export AUTH_CODE_REQUIRE_PKCE=true
5964export AUTH_CODE_VALIDATE_REDIRECT_URI=true
6065export AUTH_CODE_ALLOWED_REDIRECT_URIS=http://localhost:* ,https://myapp.com/callback
@@ -489,8 +494,8 @@ Validate Basic Authentication credentials.
489494
490495Configure credentials via environment variables:
491496
492- - ` AUTH_ALLOWED_USERNAME ` : Expected username
493- - ` AUTH_ALLOWED_PASSWORD ` : Expected password
497+ - ` AUTH_ALLOWED_USERNAME ` : Expected username (default: ` testuser ` )
498+ - ` AUTH_ALLOWED_PASSWORD ` : Expected password (default: ` testpass ` )
494499
495500** Request:**
496501
@@ -515,8 +520,8 @@ Validate Bearer token authentication. The expected token is SHA1(username:passwo
515520
516521Configure credentials via environment variables:
517522
518- - ` AUTH_ALLOWED_USERNAME ` : Username
519- - ` AUTH_ALLOWED_PASSWORD ` : Password
523+ - ` AUTH_ALLOWED_USERNAME ` : Username (default: ` testuser ` )
524+ - ` AUTH_ALLOWED_PASSWORD ` : Password (default: ` testpass ` )
520525
521526Generate the token:
522527
0 commit comments