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: docs/api/components/schemas.yaml
+72-46Lines changed: 72 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -390,25 +390,42 @@ User-session-information:
390
390
type: object
391
391
properties:
392
392
authentication_handlers:
393
-
description: The ways authentication can be established to authenticate as the user.
393
+
description: The ways authentication can be established to authenticate as a user. Used for CouchDB compatibility. Always contains "default" and "cookie".
394
394
type: array
395
-
items:
396
-
type: string
395
+
enum:
396
+
- ["default", "cookie"]
397
+
default: ["default", "cookie"]
397
398
ok:
399
+
description: Used for CouchDB compatibility. Always true.
398
400
type: boolean
401
+
enum:
402
+
- true
399
403
userCtx:
400
404
type: object
401
405
properties:
402
406
channels:
403
-
description: |
404
-
A map of the channels the user has access to and the sequence number each channel was created at.
405
-
406
-
The key is the channel name and the value is the sequence number.
407
+
description: A map of the channels in the default collection that the user is in along with the sequence number the user was granted access. This does not include inherited channels through roles.
407
408
type: object
409
+
additionalProperties:
410
+
x-additionalPropertiesName: channelName
411
+
type: number
412
+
minimum: 1
413
+
description: The sequence number the user was granted access.
414
+
title: sequence number
415
+
example:
416
+
"!": 1
417
+
"channelA": 2
408
418
name:
409
419
description: The name of the user.
410
420
type: string
411
-
nullable: true
421
+
minLength: 1
422
+
required:
423
+
- channels
424
+
- name
425
+
required:
426
+
- authentication_handlers
427
+
- ok
428
+
- userCtx
412
429
title: User Session Information
413
430
OIDC-callback:
414
431
type: object
@@ -1162,24 +1179,10 @@ Database:
1162
1179
type: number
1163
1180
default: 1
1164
1181
cors:
1165
-
description: CORS configuration for this database; if present, overrides server's config.
1166
-
type: object
1167
-
properties:
1168
-
headers:
1169
-
description: List of allowed headers
1170
-
type: array
1171
-
items:
1172
-
type: string
1173
-
login_origin:
1174
-
description: List of allowed login origins
1175
-
type: array
1176
-
items:
1177
-
type: string
1178
-
origin:
1179
-
description: 'List of allowed origins, use [''*''] to allow access from everywhere'
1180
-
type: array
1181
-
items:
1182
-
type: string
1182
+
allOf:
1183
+
- $ref: "#/CORS"
1184
+
- type: object
1185
+
description: CORS configuration for this database; if present, overrides server's config.
1183
1186
delta_sync:
1184
1187
description: |-
1185
1188
Delta sync configuration settings.
@@ -2124,26 +2127,10 @@ Startup-config:
2124
2127
type: boolean
2125
2128
default: true
2126
2129
cors:
2127
-
type: object
2128
-
properties:
2129
-
headers:
2130
-
description: List of allowed headers
2131
-
type: array
2132
-
items:
2133
-
type: string
2134
-
login_origin:
2135
-
description: List of allowed login origins
2136
-
type: array
2137
-
items:
2138
-
type: string
2139
-
max_age:
2140
-
description: Maximum age of the CORS Options request
2141
-
type: integer
2142
-
origin:
2143
-
description: 'List of allowed origins, use [''*''] to allow access from everywhere'
2144
-
type: array
2145
-
items:
2146
-
type: string
2130
+
allOf:
2131
+
- type: object
2132
+
description: CORS configuration for all databases
2133
+
- $ref: "#/CORS"
2147
2134
enable_advanced_auth_dp:
2148
2135
description: |-
2149
2136
Whether to enable the DP permissions check feature of admin auth.
@@ -3183,3 +3170,42 @@ IndexInitStatus:
3183
3170
- last_error
3184
3171
- index_status
3185
3172
title: IndexInitStatus
3173
+
CORS:
3174
+
type: object
3175
+
properties:
3176
+
headers:
3177
+
description: |-
3178
+
List of allowed headers. These headers will be added the `Access-Control-Allow-Headers` response to a valid CORS request.
3179
+
3180
+
A recommended minimum set of values should be `["Accept-Encoding", "Authorization", "Content-Type", "If-Match"]`.
3181
+
type: array
3182
+
items:
3183
+
type: string
3184
+
example:
3185
+
- Accept-Encoding
3186
+
- Authorization
3187
+
- Content-Type
3188
+
- If-Match
3189
+
login_origin:
3190
+
description: |-
3191
+
List of allowed origins to apply to public `/{db}/_session` API.
3192
+
3193
+
To use cors on `/{db}/_session`, the domain must be present in both `login_origin` and `origin`.
3194
+
3195
+
If configured, `Authorization` must be included in headers.
3196
+
type: array
3197
+
items:
3198
+
type: string
3199
+
example: ["https://example.com"]
3200
+
max_age:
3201
+
description: Value for `Access-Control-Maximum-Age`. Uses 0 by default.
3202
+
type: integer
3203
+
default: 0
3204
+
origin:
3205
+
description: |-
3206
+
List of allowed origins for the public API. The request `Origin` header is checked against these values. If successful the `Origin` header is returned in the HTTP response header as `Access-Control-Allow-Origin`.
Copy file name to clipboardExpand all lines: docs/api/paths/admin/db-_facebook.yaml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ post:
12
12
description: |-
13
13
Creates a new session based on a Facebook user. On a successful session creation, a session cookie is stored to keep the user authenticated for future API calls.
14
14
15
-
If CORS is enabled, the origin must match an allowed login origin otherwise an error will be returned.
15
+
If `Origin` header is passed to this endpoint, the `Origin` header must match both the `cors.login_origin` and `cors.origin` configuration options.
Copy file name to clipboardExpand all lines: docs/api/paths/admin/db-_google.yaml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ post:
12
12
description: |-
13
13
Creates a new session based on a Google user. On a successful session creation, a session cookie is stored to keep the user authenticated for future API calls.
14
14
15
-
If CORS is enabled, the origin must match an allowed login origin otherwise an error will be returned.
15
+
If `Origin` header is passed to this endpoint, the `Origin` header must match both the `cors.login_origin` and `cors.origin` configuration options.
Copy file name to clipboardExpand all lines: docs/api/paths/public/db-_facebook.yaml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ post:
12
12
description: |-
13
13
Creates a new session based on a Facebook user. On a successful session creation, a session cookie is stored to keep the user authenticated for future API calls.
14
14
15
-
If CORS is enabled, the origin must match an allowed login origin otherwise an error will be returned.
15
+
If `Origin` header is passed to this endpoint, the `Origin` header must match both the `cors.login_origin` and `cors.origin` configuration options.
Copy file name to clipboardExpand all lines: docs/api/paths/public/db-_google.yaml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ post:
12
12
description: |-
13
13
Creates a new session based on a Google user. On a successful session creation, a session cookie is stored to keep the user authenticated for future API calls.
14
14
15
-
If CORS is enabled, the origin must match an allowed login origin otherwise an error will be returned.
15
+
If `Origin` header is passed to this endpoint, the `Origin` header must match both the `cors.login_origin` and `cors.origin` configuration options.
0 commit comments