Skip to content

Commit 7de0e7c

Browse files
Merge pull request #27 from stac-extensions/http
Clarify http, extend http, table formatting
2 parents 14e2d87 + be6822b commit 7de0e7c

File tree

2 files changed

+51
-41
lines changed

2 files changed

+51
-41
lines changed

README.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ The fields in the table below can be used in these parts of STAC documents:
3131
- [ ] Assets (for both Collections and Items, incl. Item Asset Definitions in Collections)
3232
- [ ] Links
3333

34-
| Field Name | Type | Description |
35-
| ---------- | ------------------------------------------------------- | ------------------------------------------------------ |
36-
| `auth:schemes` | Map<string, [AuthenticationSchemeObject](#authentication-scheme-object)> | A property that contains all of the [scheme definitions](#authentication-scheme-object) used by Assets and Links in the STAC Item or Collection. |
34+
| Field Name | Type | Description |
35+
| -------------- | ------------------------------------------------------------ | ----------- |
36+
| `auth:schemes` | Map<string, [Authentication Scheme Object](#authentication-scheme-object)> | A property that contains all of the [scheme definitions](#authentication-scheme-object) used by Assets and Links in the STAC Item or Collection. |
3737

3838
---
3939

@@ -45,25 +45,25 @@ The fields in the table below can be used in these parts of STAC documents:
4545
- [x] Assets (for both Collections and Items, incl. Item Asset Definitions in Collections)
4646
- [x] Links
4747

48-
| Field Name | Type | Description |
49-
| ---------- | ------------------------------------------------------- | ------------------------------------------------------ |
48+
| Field Name | Type | Description |
49+
| ----------- | ---------- | ----------- |
5050
| `auth:refs` | \[string\] | A property that specifies which schemes in `auth:schemes` may be used to access an Asset or Link. |
5151

5252
### Scheme Types
5353

5454
The `type` value is not restircted to the following values, so a practitioner may define a custom authentication or authorization scheme not
5555
included in the scheme type standards below.
5656

57-
| Name | Description |
58-
| ------------------------- | --------------------------------------------------------------------------------------------------------------------- |
59-
| `http` | Simple HTTP without any authentication |
60-
| `s3` | Simple S3 authentication. |
61-
| `planetaryComputer` | Signs URLs with the [Planetary Computer Authentication API](https://planetarycomputer.microsoft.com/docs/reference/sas/) |
62-
| `earthdata` | Uses a token-based authentication to download data, from *some* Earthdata providers, e.g. DAACs |
63-
| `signedUrl` | Signs URLs with a user-defined authentication API. |
64-
| `oauth2` | [Open Authentication 2.0](https://swagger.io/docs/specification/authentication/oauth2/) configuration |
65-
| `apiKey` | Description of [API key](https://swagger.io/docs/specification/authentication/api-keys/) authentication included in request headers, query parameters, or cookies. |
66-
| `openIdConnect` | Description of [OpenID Connect Discovery](https://swagger.io/docs/specification/authentication/openid-connect-discovery/) authentication |
57+
| Name | Description |
58+
| ------------------- | ----------- |
59+
| `http` | Simple HTTP authentication mechanisms (Basic, Bearer, Digest, etc.). |
60+
| `s3` | Simple S3 authentication. |
61+
| `planetaryComputer` | Signs URLs with the [Planetary Computer Authentication API](https://planetarycomputer.microsoft.com/docs/reference/sas/) |
62+
| `earthdata` | Uses a token-based authentication to download data, from *some* Earthdata providers, e.g. DAACs |
63+
| `signedUrl` | Signs URLs with a user-defined authentication API. |
64+
| `oauth2` | [Open Authentication 2.0](https://swagger.io/docs/specification/authentication/oauth2/) configuration |
65+
| `apiKey` | Description of [API key](https://swagger.io/docs/specification/authentication/api-keys/) authentication included in request headers, query parameters, or cookies. |
66+
| `openIdConnect` | Description of [OpenID Connect Discovery](https://swagger.io/docs/specification/authentication/openid-connect-discovery/) authentication |
6767

6868
### Authentication Scheme Object
6969

@@ -72,15 +72,15 @@ The Authentication Scheme aligns with the
7272
API Key, and OpenID authentication. All the [authentication clients](https://github.com/stac-utils/stac-asset#clients) included in the
7373
[stac-asset](https://github.com/stac-utils/stac-asset) library can be described, as well as a custom signed URL authentication scheme.
7474

75-
| Field Name | Type | Description |
76-
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
77-
| `type` | string | **REQUIRED**. The authentication scheme type used to access the data (`http` \| `s3` \| `planetaryComputer` \| `earthdata` \| `signedUrl` \| `oauth2` \| `apiKey` \| `openIdConnect` \| `myCustomSchemeType`). |
78-
| `description` | string | Additional instructions for authentication |
79-
| `name` | string | Required for `type: apiKey`. The name of the header, query, or cookie parameter to be used. |
80-
| `in` | string | Required for `type: apiKey`. The location of the API key (`query` \| `header` \| `cookie`). |
81-
| `scheme` | string | Required for `type: http`. The name of the HTTP Authorization scheme to be used in the [Authorization header as defined in RFC7235](https://tools.ietf.org/html/rfc7235#section-5.1). The values used SHOULD be registered in the [IANA Authentication Scheme registry](https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml). (`basic` \| `bearer`) |
82-
| `flows` | Map<string, [AuthenticationFlowsObject](#authentication-flow-object)> | Required for `type: oauth2` and `type: signedUrl`. Scenarios an API client performs to get an access token from the authorization server (`authorizationCode` \| `implicit` \| `password ` \| `clientCredentials`) |
83-
| `openIdConnectUrl` | string | Required for `type: openIdConnectUrl`. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. |
75+
| Field Name | Type | Description |
76+
| ------------------ | ------------------------------------------------------------ | ----------- |
77+
| `type` | string | **REQUIRED**. The authentication scheme type used to access the data (`http` \| `s3` \| `planetaryComputer` \| `earthdata` \| `signedUrl` \| `oauth2` \| `apiKey` \| `openIdConnect` \| `myCustomSchemeType`). |
78+
| `description` | string | Additional instructions for authentication |
79+
| `name` | string | Required for `type: apiKey`. The name of the header, query, or cookie parameter to be used. |
80+
| `in` | string | Required for `type: apiKey`. The location of the API key (`query` \| `header` \| `cookie`). |
81+
| `scheme` | string | Required for `type: http`. The name of the HTTP Authorization scheme to be used in the [Authorization header as defined in RFC7235](https://tools.ietf.org/html/rfc7235#section-5.1). The values used SHOULD be registered in the [IANA Authentication Scheme registry](https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml). (`basic` \| `bearer` \| `digest` \| `dpop` \| `hoba` \| `mutual` \| `negotiate` \| `oauth` (1.0) \| `privatetoken` \| `scram-sha-1` \| `scram-sha-256` \| `vapid`) |
82+
| `flows` | Map<string, [Authentication Flows Object](#authentication-flow-object)> | Required for `type: oauth2` and `type: signedUrl`. Scenarios an API client performs to get an access token from the authorization server (`authorizationCode` \| `implicit` \| `password ` \| `clientCredentials`) |
83+
| `openIdConnectUrl` | string | Required for `type: openIdConnectUrl`. OpenID Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. |
8484

8585
### Authentication Flow Object
8686

@@ -89,27 +89,27 @@ the supported OAuth Flows.
8989

9090
Configuration details for a supported OAuth Flow
9191

92-
| Field Name | Type | Description |
93-
| ---|:---:|--- |
94-
| `authorizationUrl` | `string` | Required for `oauth2` (`"implicit"`, `"authorizationCode"`). The authorization URL to be used for this flow. This MUST be in the form of a URL. |
95-
| `tokenUrl` | `string` | Required for `oauth2` (`"password"`, `"clientCredentials"`, `"authorizationCode"`). The token URL to be used for this flow. This MUST be in the form of a URL. |
96-
| `authorizationApi` | `string` | Optional for `signedUrl`. The signed URL API endpoint to be used for this flow. If not enferred from the client environment, this must be defined in the authentication flow. |
97-
| `refreshUrl` | `string` | Optional for `oauth2`. The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. |
98-
| `scopes` | Map<`string`, `string`> | Required for `oauth2`. The available scopes for the authentication scheme. A map between the scope name and a short description for it. The map MAY be empty. |
99-
| `method` | `string` | Required for `signedUrl`. The method to be used for requests |
100-
| `parameters` | Map<string, [ParameterObject](#parameter-object)> | Optional for `signedUrl`. Parameter definition for requests to the `authorizationApi` |
101-
| `responseField` | string | Optional for `signedUrl`. Key name for the signed URL field in an authorizationApi response |
92+
| Field Name | Type | Description |
93+
| ------------------ | -------------------------------------------------- | ----------- |
94+
| `authorizationUrl` | `string` | Required for `oauth2` (`"implicit"`, `"authorizationCode"`). The authorization URL to be used for this flow. This MUST be in the form of a URL. |
95+
| `tokenUrl` | `string` | Required for `oauth2` (`"password"`, `"clientCredentials"`, `"authorizationCode"`). The token URL to be used for this flow. This MUST be in the form of a URL. |
96+
| `authorizationApi` | `string` | Optional for `signedUrl`. The signed URL API endpoint to be used for this flow. If not enferred from the client environment, this must be defined in the authentication flow. |
97+
| `refreshUrl` | `string` | Optional for `oauth2`. The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. |
98+
| `scopes` | Map<`string`, `string`> | Required for `oauth2`. The available scopes for the authentication scheme. A map between the scope name and a short description for it. The map MAY be empty. |
99+
| `method` | `string` | Required for `signedUrl`. The method to be used for requests |
100+
| `parameters` | Map<string, [Parameter Object](#parameter-object)> | Optional for `signedUrl`. Parameter definition for requests to the `authorizationApi` |
101+
| `responseField` | string | Optional for `signedUrl`. Key name for the signed URL field in an authorizationApi response |
102102

103103
### Parameter Object
104104

105105
Definition for a request parameter
106106

107-
| Field Name | Type | Description |
108-
| ---|:---:|--- |
109-
| `in` | `string` | The location of the parameter (`query` \| `header` \| `body`). |
110-
| `required` | `boolean` | Setting for optional or required parameter |
111-
| `description` | `string` | Optional. Plain language description of the parameter |
112-
| `schema` | `object` | Optional. Schema object following the [OpenAPI extended subset](https://swagger.io/docs/specification/data-models/) of the [JSON Schema spec](https://json-schema.org/) |
107+
| Field Name | Type | Description |
108+
| ------------- | --------- | ----------- |
109+
| `in` | `string` | The location of the parameter (`query` \| `header` \| `body`). |
110+
| `required` | `boolean` | Setting for optional or required parameter |
111+
| `description` | `string` | Optional. Plain language description of the parameter |
112+
| `schema` | `object` | Optional. Schema object following the [OpenAPI extended subset](https://swagger.io/docs/specification/data-models/) of the [JSON Schema spec](https://json-schema.org/) |
113113

114114
### Examples
115115

json-schema/schema.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,17 @@
271271
"type": "string",
272272
"examples": [
273273
"basic",
274-
"bearer"
274+
"bearer",
275+
"digest",
276+
"dpop",
277+
"hoba",
278+
"mutual",
279+
"negotiate",
280+
"oauth",
281+
"privatetoken",
282+
"scram-sha-1",
283+
"scram-sha-256",
284+
"vapid"
275285
]
276286
},
277287
"openConnectUrl": {

0 commit comments

Comments
 (0)