Skip to content

Commit

Permalink
feat: graduate recently added experimental features to stable API
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Feb 2, 2024
1 parent e556189 commit 94da0c9
Show file tree
Hide file tree
Showing 23 changed files with 263 additions and 377 deletions.
16 changes: 8 additions & 8 deletions conformance/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,22 +236,22 @@ export const green = (options?: MacroOptions) =>
switch (endpoint) {
case 'token':
return <oauth.TokenEndpointRequestOptions>{
[oauth.experimental_useMtlsAlias]: mtlsAuth || mtlsConstrain ? true : false,
[oauth.experimental_customFetch]: mtlsAuth || mtlsConstrain ? mtlsFetch : undefined,
[oauth.useMtlsAlias]: mtlsAuth || mtlsConstrain ? true : false,
[oauth.customFetch]: mtlsAuth || mtlsConstrain ? mtlsFetch : undefined,
}
case 'par':
return <oauth.PushedAuthorizationRequestOptions>{
[oauth.experimental_useMtlsAlias]: mtlsAuth ? true : false,
[oauth.experimental_customFetch]: mtlsAuth ? mtlsFetch : undefined,
[oauth.useMtlsAlias]: mtlsAuth ? true : false,
[oauth.customFetch]: mtlsAuth ? mtlsFetch : undefined,
}
case 'userinfo':
return <oauth.UserInfoRequestOptions>{
[oauth.experimental_useMtlsAlias]: mtlsConstrain ? true : false,
[oauth.experimental_customFetch]: mtlsConstrain ? mtlsFetch : undefined,
[oauth.useMtlsAlias]: mtlsConstrain ? true : false,
[oauth.customFetch]: mtlsConstrain ? mtlsFetch : undefined,
}
case 'resource':
return <oauth.ProtectedResourceRequestOptions>{
[oauth.experimental_customFetch]: mtlsConstrain ? mtlsFetch : undefined,
[oauth.customFetch]: mtlsConstrain ? mtlsFetch : undefined,
}
default:
throw new Error()
Expand Down Expand Up @@ -386,7 +386,7 @@ export const green = (options?: MacroOptions) =>
fragmentParams.set('id_token', await decryptIdToken(idToken))
decrypted = true
}
params = await oauth.experimental_validateDetachedSignatureResponse(
params = await oauth.validateDetachedSignatureResponse(
as,
client,
decrypted ? fragmentParams : currentUrl,
Expand Down
15 changes: 5 additions & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,13 @@
- [OperationProcessingError](classes/OperationProcessingError.md)
- [UnsupportedOperationError](classes/UnsupportedOperationError.md)

### Experimental

- [experimental\_customFetch](variables/experimental_customFetch.md)
- [experimental\_useMtlsAlias](variables/experimental_useMtlsAlias.md)
- [experimental\_validateDetachedSignatureResponse](functions/experimental_validateDetachedSignatureResponse.md)
- [experimental\_validateJwtAccessToken](functions/experimental_validateJwtAccessToken.md)

### FAPI 1.0 Advanced

- [experimental\_validateDetachedSignatureResponse](functions/experimental_validateDetachedSignatureResponse.md)
- [validateDetachedSignatureResponse](functions/validateDetachedSignatureResponse.md)

### JWT Access Tokens

- [experimental\_validateJwtAccessToken](functions/experimental_validateJwtAccessToken.md)
- [validateJwtAccessToken](functions/validateJwtAccessToken.md)

### JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)

Expand Down Expand Up @@ -152,7 +145,6 @@
- [DeviceAuthorizationRequestOptions](interfaces/DeviceAuthorizationRequestOptions.md)
- [DeviceAuthorizationResponse](interfaces/DeviceAuthorizationResponse.md)
- [DiscoveryRequestOptions](interfaces/DiscoveryRequestOptions.md)
- [ExperimentalUseMTLSAliasOptions](interfaces/ExperimentalUseMTLSAliasOptions.md)
- [GenerateKeyPairOptions](interfaces/GenerateKeyPairOptions.md)
- [HttpRequestOptions](interfaces/HttpRequestOptions.md)
- [IDToken](interfaces/IDToken.md)
Expand All @@ -170,6 +162,7 @@
- [RevocationRequestOptions](interfaces/RevocationRequestOptions.md)
- [TokenEndpointRequestOptions](interfaces/TokenEndpointRequestOptions.md)
- [TokenEndpointResponse](interfaces/TokenEndpointResponse.md)
- [UseMTLSAliasOptions](interfaces/UseMTLSAliasOptions.md)
- [UserInfoAddress](interfaces/UserInfoAddress.md)
- [UserInfoRequestOptions](interfaces/UserInfoRequestOptions.md)
- [UserInfoResponse](interfaces/UserInfoResponse.md)
Expand All @@ -190,10 +183,12 @@

- [clockSkew](variables/clockSkew.md)
- [clockTolerance](variables/clockTolerance.md)
- [customFetch](variables/customFetch.md)
- [expectNoNonce](variables/expectNoNonce.md)
- [expectNoState](variables/expectNoState.md)
- [skipAuthTimeCheck](variables/skipAuthTimeCheck.md)
- [skipStateCheck](variables/skipStateCheck.md)
- [skipSubjectCheck](variables/skipSubjectCheck.md)
- [useMtlsAlias](variables/useMtlsAlias.md)

</details>
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Function: experimental\_validateDetachedSignatureResponse
# Function: validateDetachedSignatureResponse

[💗 Help the project](https://github.com/sponsors/panva)

**experimental_validateDetachedSignatureResponse**(`as`, `client`, `parameters`, `expectedNonce`, `expectedState?`, `maxAge?`, `options?`): [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`URLSearchParams`]( https://developer.mozilla.org/docs/Web/API/URLSearchParams ) \| [`OAuth2Error`](../interfaces/OAuth2Error.md)\>

This is an experimental feature, it is not subject to semantic versioning rules. Non-backward
compatible changes or removal may occur in any future release.
**validateDetachedSignatureResponse**(`as`, `client`, `parameters`, `expectedNonce`, `expectedState?`, `maxAge?`, `options?`): [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`URLSearchParams`]( https://developer.mozilla.org/docs/Web/API/URLSearchParams ) \| [`OAuth2Error`](../interfaces/OAuth2Error.md)\>

Same as [validateAuthResponse](validateAuthResponse.md) but for FAPI 1.0 Advanced Detached Signature authorization
responses.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Function: experimental\_validateJwtAccessToken
# Function: validateJwtAccessToken

[💗 Help the project](https://github.com/sponsors/panva)

**experimental_validateJwtAccessToken**(`as`, `request`, `expectedAudience`, `options?`): [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`JWTAccessTokenClaims`](../interfaces/JWTAccessTokenClaims.md)\>

This is an experimental feature, it is not subject to semantic versioning rules. Non-backward
compatible changes or removal may occur in any future release.
**validateJwtAccessToken**(`as`, `request`, `expectedAudience`, `options?`): [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`JWTAccessTokenClaims`](../interfaces/JWTAccessTokenClaims.md)\>

Validates use of JSON Web Token (JWT) OAuth 2.0 Access Tokens for a given Request as per
RFC 9068 and optionally also RFC 9449.
Expand Down
20 changes: 7 additions & 13 deletions docs/interfaces/AuthenticatedRequestOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,20 @@

## Table of contents

### Experimental

- [[experimental\_useMtlsAlias]](AuthenticatedRequestOptions.md#experimental_usemtlsalias)

### Properties

- [[useMtlsAlias]](AuthenticatedRequestOptions.md#usemtlsalias)
- [clientPrivateKey](AuthenticatedRequestOptions.md#clientprivatekey)

## Experimental

### [experimental\_useMtlsAlias]
## Properties

`Optional` **[experimental\_useMtlsAlias]**: `boolean`
### [useMtlsAlias]

This is an experimental feature, it is not subject to semantic versioning rules. Non-backward
compatible changes or removal may occur in any future release.
`Optional` **[useMtlsAlias]**: `boolean`

See [experimental_useMtlsAlias](../variables/experimental_useMtlsAlias.md) for its documentation.
See [useMtlsAlias](../variables/useMtlsAlias.md).

## Properties
___

### clientPrivateKey

Expand All @@ -35,7 +29,7 @@ a supported [JWS `alg` Algorithm](../types/JWSAlgorithm.md).

## Hierarchy

- [`ExperimentalUseMTLSAliasOptions`](ExperimentalUseMTLSAliasOptions.md)
- [`UseMTLSAliasOptions`](UseMTLSAliasOptions.md)

**`AuthenticatedRequestOptions`**

Expand Down
35 changes: 13 additions & 22 deletions docs/interfaces/ClientCredentialsGrantRequestOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,38 @@

## Table of contents

### Experimental

- [[experimental\_customFetch]](ClientCredentialsGrantRequestOptions.md#experimental_customfetch)
- [[experimental\_useMtlsAlias]](ClientCredentialsGrantRequestOptions.md#experimental_usemtlsalias)

### Properties

- [DPoP](ClientCredentialsGrantRequestOptions.md#dpop)
- [[customFetch]](ClientCredentialsGrantRequestOptions.md#customfetch)
- [[useMtlsAlias]](ClientCredentialsGrantRequestOptions.md#usemtlsalias)
- [clientPrivateKey](ClientCredentialsGrantRequestOptions.md#clientprivatekey)
- [headers](ClientCredentialsGrantRequestOptions.md#headers)
- [signal](ClientCredentialsGrantRequestOptions.md#signal)

## Experimental

### [experimental\_customFetch]
## Properties

`Optional` **[experimental\_customFetch]**: (`input`: `RequestInfo` \| [`URL`]( https://developer.mozilla.org/docs/Web/API/URL ), `init?`: `RequestInit`) => [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`Response`]( https://developer.mozilla.org/docs/Web/API/Response )\>
### DPoP

This is an experimental feature, it is not subject to semantic versioning rules. Non-backward
compatible changes or removal may occur in any future release.
`Optional` **DPoP**: [`DPoPOptions`](DPoPOptions.md)

See [experimental_customFetch](../variables/experimental_customFetch.md) for its documentation.
DPoP-related options.

___

### [experimental\_useMtlsAlias]
### [customFetch]

`Optional` **[experimental\_useMtlsAlias]**: `boolean`
`Optional` **[customFetch]**: (`input`: `RequestInfo` \| [`URL`]( https://developer.mozilla.org/docs/Web/API/URL ), `init?`: `RequestInit`) => [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`Response`]( https://developer.mozilla.org/docs/Web/API/Response )\>

This is an experimental feature, it is not subject to semantic versioning rules. Non-backward
compatible changes or removal may occur in any future release.
See [customFetch](../variables/customFetch.md).

See [experimental_useMtlsAlias](../variables/experimental_useMtlsAlias.md) for its documentation.

## Properties
___

### DPoP
### [useMtlsAlias]

`Optional` **DPoP**: [`DPoPOptions`](DPoPOptions.md)
`Optional` **[useMtlsAlias]**: `boolean`

DPoP-related options.
See [useMtlsAlias](../variables/useMtlsAlias.md).

___

Expand Down
29 changes: 10 additions & 19 deletions docs/interfaces/DeviceAuthorizationRequestOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,31 @@

## Table of contents

### Experimental

- [[experimental\_customFetch]](DeviceAuthorizationRequestOptions.md#experimental_customfetch)
- [[experimental\_useMtlsAlias]](DeviceAuthorizationRequestOptions.md#experimental_usemtlsalias)

### Properties

- [[customFetch]](DeviceAuthorizationRequestOptions.md#customfetch)
- [[useMtlsAlias]](DeviceAuthorizationRequestOptions.md#usemtlsalias)
- [clientPrivateKey](DeviceAuthorizationRequestOptions.md#clientprivatekey)
- [headers](DeviceAuthorizationRequestOptions.md#headers)
- [signal](DeviceAuthorizationRequestOptions.md#signal)

## Experimental

### [experimental\_customFetch]
## Properties

`Optional` **[experimental\_customFetch]**: (`input`: `RequestInfo` \| [`URL`]( https://developer.mozilla.org/docs/Web/API/URL ), `init?`: `RequestInit`) => [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`Response`]( https://developer.mozilla.org/docs/Web/API/Response )\>
### [customFetch]

This is an experimental feature, it is not subject to semantic versioning rules. Non-backward
compatible changes or removal may occur in any future release.
`Optional` **[customFetch]**: (`input`: `RequestInfo` \| [`URL`]( https://developer.mozilla.org/docs/Web/API/URL ), `init?`: `RequestInit`) => [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`Response`]( https://developer.mozilla.org/docs/Web/API/Response )\>

See [experimental_customFetch](../variables/experimental_customFetch.md) for its documentation.
See [customFetch](../variables/customFetch.md).

___

### [experimental\_useMtlsAlias]
### [useMtlsAlias]

`Optional` **[experimental\_useMtlsAlias]**: `boolean`
`Optional` **[useMtlsAlias]**: `boolean`

This is an experimental feature, it is not subject to semantic versioning rules. Non-backward
compatible changes or removal may occur in any future release.
See [useMtlsAlias](../variables/useMtlsAlias.md).

See [experimental_useMtlsAlias](../variables/experimental_useMtlsAlias.md) for its documentation.

## Properties
___

### clientPrivateKey

Expand Down
18 changes: 6 additions & 12 deletions docs/interfaces/DiscoveryRequestOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,22 @@

## Table of contents

### Experimental

- [[experimental\_customFetch]](DiscoveryRequestOptions.md#experimental_customfetch)

### Properties

- [[customFetch]](DiscoveryRequestOptions.md#customfetch)
- [algorithm](DiscoveryRequestOptions.md#algorithm)
- [headers](DiscoveryRequestOptions.md#headers)
- [signal](DiscoveryRequestOptions.md#signal)

## Experimental

### [experimental\_customFetch]
## Properties

`Optional` **[experimental\_customFetch]**: (`input`: `RequestInfo` \| [`URL`]( https://developer.mozilla.org/docs/Web/API/URL ), `init?`: `RequestInit`) => [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`Response`]( https://developer.mozilla.org/docs/Web/API/Response )\>
### [customFetch]

This is an experimental feature, it is not subject to semantic versioning rules. Non-backward
compatible changes or removal may occur in any future release.
`Optional` **[customFetch]**: (`input`: `RequestInfo` \| [`URL`]( https://developer.mozilla.org/docs/Web/API/URL ), `init?`: `RequestInit`) => [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`Response`]( https://developer.mozilla.org/docs/Web/API/Response )\>

See [experimental_customFetch](../variables/experimental_customFetch.md) for its documentation.
See [customFetch](../variables/customFetch.md).

## Properties
___

### algorithm

Expand Down
28 changes: 0 additions & 28 deletions docs/interfaces/ExperimentalUseMTLSAliasOptions.md

This file was deleted.

18 changes: 6 additions & 12 deletions docs/interfaces/HttpRequestOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,21 @@

## Table of contents

### Experimental

- [[experimental\_customFetch]](HttpRequestOptions.md#experimental_customfetch)

### Properties

- [[customFetch]](HttpRequestOptions.md#customfetch)
- [headers](HttpRequestOptions.md#headers)
- [signal](HttpRequestOptions.md#signal)

## Experimental

### [experimental\_customFetch]
## Properties

`Optional` **[experimental\_customFetch]**: (`input`: `RequestInfo` \| [`URL`]( https://developer.mozilla.org/docs/Web/API/URL ), `init?`: `RequestInit`) => [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`Response`]( https://developer.mozilla.org/docs/Web/API/Response )\>
### [customFetch]

This is an experimental feature, it is not subject to semantic versioning rules. Non-backward
compatible changes or removal may occur in any future release.
`Optional` **[customFetch]**: (`input`: `RequestInfo` \| [`URL`]( https://developer.mozilla.org/docs/Web/API/URL ), `init?`: `RequestInit`) => [`Promise`]( https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise )\<[`Response`]( https://developer.mozilla.org/docs/Web/API/Response )\>

See [experimental_customFetch](../variables/experimental_customFetch.md) for its documentation.
See [customFetch](../variables/customFetch.md).

## Properties
___

### headers

Expand Down

0 comments on commit 94da0c9

Please sign in to comment.