-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify response interface in handler and request interceptors (#42442)
* add response factory to the interceptors * adopt x-pack code to the changes * Add a separate response factory for lifecycles. Only route handler can respond with 2xx response. Interceptors may redirect or reject an incoming request. * re-generate docs * response.internal --> response.internalError * use internalError for exceptions in authenticator * before Security plugin proxied ES error status code. now sets explicitly. * provide error via message field of error response for BWC * update docs * add customError response * restore integration test and update unit tests * update docs * support Hapi error format for BWC * add a couple of tests
- Loading branch information
Showing
44 changed files
with
1,898 additions
and
1,710 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
13 changes: 0 additions & 13 deletions
13
docs/development/core/server/kibana-plugin-server.authtoolkit.redirected.md
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
docs/development/core/server/kibana-plugin-server.authtoolkit.rejected.md
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
docs/development/core/server/kibana-plugin-server.lifecycleresponsefactory.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,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [LifecycleResponseFactory](./kibana-plugin-server.lifecycleresponsefactory.md) | ||
|
||
## LifecycleResponseFactory type | ||
|
||
Creates an object containing redirection or error response with error details, HTTP headers, and other data transmitted to the client. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare type LifecycleResponseFactory = typeof lifecycleResponseFactory; | ||
``` |
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
13 changes: 0 additions & 13 deletions
13
docs/development/core/server/kibana-plugin-server.onpostauthtoolkit.redirected.md
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
docs/development/core/server/kibana-plugin-server.onpostauthtoolkit.rejected.md
This file was deleted.
Oops, something went wrong.
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
15 changes: 0 additions & 15 deletions
15
docs/development/core/server/kibana-plugin-server.onpreauthtoolkit.redirected.md
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
docs/development/core/server/kibana-plugin-server.onpreauthtoolkit.rejected.md
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
docs/development/core/server/kibana-plugin-server.onpreauthtoolkit.rewriteurl.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,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md) > [rewriteUrl](./kibana-plugin-server.onpreauthtoolkit.rewriteurl.md) | ||
|
||
## OnPreAuthToolkit.rewriteUrl property | ||
|
||
Rewrite requested resources url before is was authenticated and routed to a handler | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
rewriteUrl: (url: string) => OnPreAuthResult; | ||
``` |
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
11 changes: 0 additions & 11 deletions
11
docs/development/core/server/kibana-plugin-server.router.routes.md
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.