-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add experimental support for FAPI 1.0
- Loading branch information
Showing
13 changed files
with
430 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { test, red, modules } from '../runner.js' | ||
|
||
for (const module of modules('encrypted-idtoken-usingrsa15')) { | ||
test.serial(red, module, 'failed to decrypt ID Token') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { test, green, modules } from '../runner.js' | ||
|
||
for (const module of modules('encrypted-idtoken')) { | ||
test.serial(green, module) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
import test from 'ava' | ||
import { test, red, modules, variant } from '../runner.js' | ||
|
||
test.todo('iat-is-week-in-past') | ||
for (const module of modules('iat-is-week-in-past')) { | ||
if (variant.fapi_response_mode === 'jarm') { | ||
// TODO: https://gitlab.com/openid/conformance-suite/-/merge_requests/1368 | ||
test.todo('iat-is-week-in-past') | ||
} else { | ||
test.serial( | ||
red, | ||
module, | ||
'unexpected JWT "iat" (issued at) claim value, it is too far in the past', | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { test, red, modules } from '../runner.js' | ||
|
||
for (const module of modules('invalid-chash')) { | ||
test.serial(red, module, 'invalid ID Token "c_hash" (code hash) claim value') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { test, red, modules } from '../runner.js' | ||
|
||
for (const module of modules('invalid-missing-shash')) { | ||
test.serial(red, module, 'invalid ID Token "s_hash" (state hash) claim value') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { test, red, modules } from '../runner.js' | ||
|
||
for (const module of modules('invalid-shash')) { | ||
test.serial(red, module, 'invalid ID Token "s_hash" (state hash) claim value') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
docs/functions/experimental_validateDetachedSignatureResponse.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Function: experimental\_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. | ||
|
||
Same as [validateAuthResponse](validateAuthResponse.md) but for FAPI 1.0 Advanced Detached Signature authorization | ||
responses. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `as` | [`AuthorizationServer`](../interfaces/AuthorizationServer.md) | Authorization Server Metadata. | | ||
| `client` | [`Client`](../interfaces/Client.md) | Client Metadata. | | ||
| `parameters` | [`URLSearchParams`]( https://developer.mozilla.org/docs/Web/API/URLSearchParams ) | Authorization Response. | | ||
| `expectedNonce` | `string` | Expected ID Token `nonce` claim value. | | ||
| `expectedState?` | `string` \| typeof [`expectNoState`](../variables/expectNoState.md) | Expected `state` parameter value. Default is [expectNoState](../variables/expectNoState.md). | | ||
| `maxAge?` | `number` \| typeof [`skipAuthTimeCheck`](../variables/skipAuthTimeCheck.md) | ID Token [`auth_time`](../interfaces/IDToken.md#auth_time) claim value will be checked to be present and conform to the `maxAge` value. Use of this option is required if you sent a `max_age` parameter in an authorization request. Default is [`client.default_max_age`](../interfaces/Client.md#default_max_age) and falls back to [skipAuthTimeCheck](../variables/skipAuthTimeCheck.md). | | ||
| `options?` | [`HttpRequestOptions`](../interfaces/HttpRequestOptions.md) | - | | ||
|
||
#### Returns | ||
|
||
[`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)\> | ||
|
||
Validated Authorization Response parameters or Authorization Error Response. | ||
|
||
**`See`** | ||
|
||
[Financial-grade API Security Profile 1.0 - Part 2: Advanced](https://openid.net/specs/openid-financial-api-part-2-1_0.html#id-token-as-detached-signature) |
Oops, something went wrong.