mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-04-05 08:54:17 -04:00
Renamed 'AUTH_TOKEN' to 'AUTH_INTERNAL_BEARER_TOKEN'. Updated README.md
This commit is contained in:
10
README.md
10
README.md
@@ -82,7 +82,7 @@ services:
|
|||||||
# The password used to log in to the voucher portal Web UI
|
# The password used to log in to the voucher portal Web UI
|
||||||
AUTH_INTERNAL_PASSWORD: '0000'
|
AUTH_INTERNAL_PASSWORD: '0000'
|
||||||
# The Bearer token used for the API
|
# The Bearer token used for the API
|
||||||
AUTH_TOKEN: '00000000-0000-0000-0000-000000000000'
|
AUTH_INTERNAL_BEARER_TOKEN: '00000000-0000-0000-0000-000000000000'
|
||||||
# Toggle to enable/disable OIDC authentication
|
# Toggle to enable/disable OIDC authentication
|
||||||
AUTH_OIDC_ENABLED: 'false'
|
AUTH_OIDC_ENABLED: 'false'
|
||||||
# OIDC issuer base url provided by oauth provider. Example: https://auth.example.com/.well-known/openid-configuration
|
# OIDC issuer base url provided by oauth provider. Example: https://auth.example.com/.well-known/openid-configuration
|
||||||
@@ -230,7 +230,7 @@ the different endpoints available in the API:
|
|||||||
```
|
```
|
||||||
|
|
||||||
> This endpoint is protected by a security mechanism. To access it, users need to include a bearer token in the
|
> This endpoint is protected by a security mechanism. To access it, users need to include a bearer token in the
|
||||||
request authorization header. The token must match the value of the `AUTH_TOKEN` environment variable. Without
|
request authorization header. The token must match the value of the `AUTH_INTERNAL_BEARER_TOKEN` environment variable. Without
|
||||||
this token, access to the endpoint will be denied.
|
this token, access to the endpoint will be denied.
|
||||||
|
|
||||||
4. **`/api/vouchers`**
|
4. **`/api/vouchers`**
|
||||||
@@ -269,7 +269,7 @@ the different endpoints available in the API:
|
|||||||
```
|
```
|
||||||
|
|
||||||
> This endpoint is protected by a security mechanism. To access it, users need to include a bearer token in the
|
> This endpoint is protected by a security mechanism. To access it, users need to include a bearer token in the
|
||||||
request authorization header. The token must match the value of the `AUTH_TOKEN` environment variable. Without
|
request authorization header. The token must match the value of the `AUTH_INTERNAL_BEARER_TOKEN` environment variable. Without
|
||||||
this token, access to the endpoint will be denied.
|
this token, access to the endpoint will be denied.
|
||||||
|
|
||||||
## Authentication
|
## Authentication
|
||||||
@@ -509,6 +509,10 @@ When upgrading from 3.x to 4.x, the following changes need to be made:
|
|||||||
- **`AUTH_PASSWORD`** has been renamed to **`AUTH_INTERNAL_PASSWORD`**.
|
- **`AUTH_PASSWORD`** has been renamed to **`AUTH_INTERNAL_PASSWORD`**.
|
||||||
- Update your environment variable to use `AUTH_INTERNAL_PASSWORD` if you rely on internal authentication.
|
- Update your environment variable to use `AUTH_INTERNAL_PASSWORD` if you rely on internal authentication.
|
||||||
|
|
||||||
|
5. **Bearer Token Variable Rename**
|
||||||
|
- **`AUTH_TOKEN`** has been replaced by **`AUTH_INTERNAL_BEARER_TOKEN`**.
|
||||||
|
- Update your environment variable to use `AUTH_INTERNAL_BEARER_TOKEN` for api bearer token authentication.
|
||||||
|
|
||||||
### Migration from 2.x to 3.x
|
### Migration from 2.x to 3.x
|
||||||
|
|
||||||
When upgrading from 2.x to 3.x, the following changes need to be made:
|
When upgrading from 2.x to 3.x, the following changes need to be made:
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ services:
|
|||||||
UNIFI_SSID_PASSWORD: ''
|
UNIFI_SSID_PASSWORD: ''
|
||||||
AUTH_INTERNAL_ENABLED: 'true'
|
AUTH_INTERNAL_ENABLED: 'true'
|
||||||
AUTH_INTERNAL_PASSWORD: '0000'
|
AUTH_INTERNAL_PASSWORD: '0000'
|
||||||
AUTH_TOKEN: '00000000-0000-0000-0000-000000000000'
|
AUTH_INTERNAL_BEARER_TOKEN: '00000000-0000-0000-0000-000000000000'
|
||||||
AUTH_OIDC_ENABLED: 'false'
|
AUTH_OIDC_ENABLED: 'false'
|
||||||
AUTH_OIDC_ISSUER_BASE_URL: ''
|
AUTH_OIDC_ISSUER_BASE_URL: ''
|
||||||
AUTH_OIDC_APP_BASE_URL: ''
|
AUTH_OIDC_APP_BASE_URL: ''
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = {
|
|||||||
serviceApi: config('service_api') || (process.env.SERVICE_API === 'true') || false,
|
serviceApi: config('service_api') || (process.env.SERVICE_API === 'true') || false,
|
||||||
authInternalEnabled: config('auth_internal_enabled') !== null ? config('auth_internal_enabled') : process.env.AUTH_INTERNAL_ENABLED ? process.env.AUTH_INTERNAL_ENABLED !== 'false' : true,
|
authInternalEnabled: config('auth_internal_enabled') !== null ? config('auth_internal_enabled') : process.env.AUTH_INTERNAL_ENABLED ? process.env.AUTH_INTERNAL_ENABLED !== 'false' : true,
|
||||||
authInternalPassword: config('auth_internal_password') || process.env.AUTH_INTERNAL_PASSWORD || '0000',
|
authInternalPassword: config('auth_internal_password') || process.env.AUTH_INTERNAL_PASSWORD || '0000',
|
||||||
authToken: config('auth_token') || process.env.AUTH_TOKEN || '00000000-0000-0000-0000-000000000000',
|
authToken: config('auth_internal_bearer_token') || process.env.AUTH_INTERNAL_BEARER_TOKEN || '00000000-0000-0000-0000-000000000000',
|
||||||
authOidcEnabled: config('auth_oidc_enabled') || (process.env.AUTH_OIDC_ENABLED === 'true') || false,
|
authOidcEnabled: config('auth_oidc_enabled') || (process.env.AUTH_OIDC_ENABLED === 'true') || false,
|
||||||
authOidcIssuerBaseUrl: config('auth_oidc_issuer_base_url') || process.env.AUTH_OIDC_ISSUER_BASE_URL || '',
|
authOidcIssuerBaseUrl: config('auth_oidc_issuer_base_url') || process.env.AUTH_OIDC_ISSUER_BASE_URL || '',
|
||||||
authOidcAppBaseUrl: config('auth_oidc_app_base_url') || process.env.AUTH_OIDC_APP_BASE_URL || '',
|
authOidcAppBaseUrl: config('auth_oidc_app_base_url') || process.env.AUTH_OIDC_APP_BASE_URL || '',
|
||||||
|
|||||||
Reference in New Issue
Block a user