-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Session storage refactoring (#37992)
* Kibana request keep a reference to raw request. used to bind hapi-cookie * CookieSessionStorage should work with KibanaRequest as soon as registerAuth refactored to restrict access to hapi Request, CookieSessionStorage won't work with hapi request directly * change registerAuth public api * adopt auth lifecycle tests * move lifecycle auth tests from integration to unit and adopt to new api. * mark toRawRequest as internal to prevent exposure * generate docs * reword test cases * mark Request internals in tsdoc
- Loading branch information
Showing
26 changed files
with
379 additions
and
251 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
25 changes: 0 additions & 25 deletions
25
docs/development/core/server/kibana-plugin-server.kibanarequest.from.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
15 changes: 0 additions & 15 deletions
15
...t/core/server/kibana-plugin-server.kibanarequest.unstable_getincomingmessage.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
17 changes: 17 additions & 0 deletions
17
docs/development/core/server/kibana-plugin-server.sessionstorage.clear.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,17 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SessionStorage](./kibana-plugin-server.sessionstorage.md) > [clear](./kibana-plugin-server.sessionstorage.clear.md) | ||
|
||
## SessionStorage.clear() method | ||
|
||
Clears current session. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
clear(): void; | ||
``` | ||
<b>Returns:</b> | ||
|
||
`void` | ||
|
17 changes: 17 additions & 0 deletions
17
docs/development/core/server/kibana-plugin-server.sessionstorage.get.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,17 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SessionStorage](./kibana-plugin-server.sessionstorage.md) > [get](./kibana-plugin-server.sessionstorage.get.md) | ||
|
||
## SessionStorage.get() method | ||
|
||
Retrieves session value from the session storage. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
get(): Promise<T | null>; | ||
``` | ||
<b>Returns:</b> | ||
|
||
`Promise<T | null>` | ||
|
22 changes: 22 additions & 0 deletions
22
docs/development/core/server/kibana-plugin-server.sessionstorage.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,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SessionStorage](./kibana-plugin-server.sessionstorage.md) | ||
|
||
## SessionStorage interface | ||
|
||
Provides an interface to store and retrieve data across requests. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface SessionStorage<T> | ||
``` | ||
|
||
## Methods | ||
|
||
| Method | Description | | ||
| --- | --- | | ||
| [clear()](./kibana-plugin-server.sessionstorage.clear.md) | Clears current session. | | ||
| [get()](./kibana-plugin-server.sessionstorage.get.md) | Retrieves session value from the session storage. | | ||
| [set(sessionValue)](./kibana-plugin-server.sessionstorage.set.md) | Puts current session value into the session storage. | | ||
|
24 changes: 24 additions & 0 deletions
24
docs/development/core/server/kibana-plugin-server.sessionstorage.set.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,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SessionStorage](./kibana-plugin-server.sessionstorage.md) > [set](./kibana-plugin-server.sessionstorage.set.md) | ||
|
||
## SessionStorage.set() method | ||
|
||
Puts current session value into the session storage. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
set(sessionValue: T): void; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| sessionValue | <code>T</code> | value to put | | ||
|
||
<b>Returns:</b> | ||
|
||
`void` | ||
|
11 changes: 11 additions & 0 deletions
11
.../development/core/server/kibana-plugin-server.sessionstoragefactory.asscoped.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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SessionStorageFactory](./kibana-plugin-server.sessionstoragefactory.md) > [asScoped](./kibana-plugin-server.sessionstoragefactory.asscoped.md) | ||
|
||
## SessionStorageFactory.asScoped property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
asScoped: (request: Readonly<Request> | KibanaRequest) => SessionStorage<T>; | ||
``` |
20 changes: 20 additions & 0 deletions
20
docs/development/core/server/kibana-plugin-server.sessionstoragefactory.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,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SessionStorageFactory](./kibana-plugin-server.sessionstoragefactory.md) | ||
|
||
## SessionStorageFactory interface | ||
|
||
SessionStorage factory to bind one to an incoming request | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface SessionStorageFactory<T> | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [asScoped](./kibana-plugin-server.sessionstoragefactory.asscoped.md) | <code>(request: Readonly<Request> | KibanaRequest) => SessionStorage<T></code> | | | ||
|
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
Oops, something went wrong.