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
@@ -1664,24 +1681,10 @@ Database:
1664
1681
1665
1682
This also sets the default value of query param `request_plus` for [GET /{keyspace}/_changes](#operation/get_keyspace-_changes) or `request_plus` for [POST /{keyspace}/_changes](#operation/post_keyspace-_changes).
1666
1683
cors:
1667
-
description: CORS configuration for this database; if present, overrides server's config.
1668
-
type: object
1669
-
properties:
1670
-
origin:
1671
-
description: 'List of allowed origins, use [''*''] to allow access from everywhere'
1672
-
type: array
1673
-
items:
1674
-
type: string
1675
-
login_origin:
1676
-
description: List of allowed login origins
1677
-
type: array
1678
-
items:
1679
-
type: string
1680
-
headers:
1681
-
description: List of allowed headers
1682
-
type: array
1683
-
items:
1684
-
type: string
1684
+
allOf:
1685
+
- $ref: "#/CORS"
1686
+
- type: object
1687
+
description: CORS configuration for this database; if present, overrides server's config.
1685
1688
logging:
1686
1689
description: Per-database logging configuration.
1687
1690
type: object
@@ -2175,26 +2178,10 @@ Startup-config:
2175
2178
description: The TLS key file to use for the REST APIs
2176
2179
type: string
2177
2180
cors:
2178
-
type: object
2179
-
properties:
2180
-
origin:
2181
-
description: 'List of allowed origins, use [''*''] to allow access from everywhere'
2182
-
type: array
2183
-
items:
2184
-
type: string
2185
-
login_origin:
2186
-
description: List of allowed login origins
2187
-
type: array
2188
-
items:
2189
-
type: string
2190
-
headers:
2191
-
description: List of allowed headers
2192
-
type: array
2193
-
items:
2194
-
type: string
2195
-
max_age:
2196
-
description: Maximum age of the CORS Options request
2197
-
type: integer
2181
+
allOf:
2182
+
- type: object
2183
+
description: CORS configuration for all databases
2184
+
- $ref: "#/CORS"
2198
2185
readOnly: true
2199
2186
logging:
2200
2187
description: The configuration settings for modifying Sync Gateway logging.
@@ -3082,3 +3069,42 @@ IndexInitStatus:
3082
3069
- last_error
3083
3070
- index_status
3084
3071
title: IndexInitStatus
3072
+
CORS:
3073
+
type: object
3074
+
properties:
3075
+
headers:
3076
+
description: |-
3077
+
List of allowed headers. These headers will be added the `Access-Control-Allow-Headers` response to a valid CORS request.
3078
+
3079
+
A recommended minimum set of values should be `["Accept-Encoding", "Authorization", "Content-Type", "If-Match"]`.
3080
+
type: array
3081
+
items:
3082
+
type: string
3083
+
example:
3084
+
- Accept-Encoding
3085
+
- Authorization
3086
+
- Content-Type
3087
+
- If-Match
3088
+
login_origin:
3089
+
description: |-
3090
+
List of allowed origins to apply to public `/{db}/_session` API.
3091
+
3092
+
To use cors on `/{db}/_session`, the domain must be present in both `login_origin` and `origin`.
3093
+
3094
+
If configured, `Authorization` must be included in headers.
3095
+
type: array
3096
+
items:
3097
+
type: string
3098
+
example: ["https://example.com"]
3099
+
max_age:
3100
+
description: Value for `Access-Control-Maximum-Age`. Uses 0 by default.
3101
+
type: integer
3102
+
default: 0
3103
+
origin:
3104
+
description: |-
3105
+
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