Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Mar 5, 2020
1 parent 5efb16a commit c5cb1fd
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [AuthRedirected](./kibana-plugin-server.authredirected.md)

## AuthRedirected interface


<b>Signature:</b>

```typescript
export interface AuthRedirected extends AuthRedirectedParams
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [type](./kibana-plugin-server.authredirected.type.md) | <code>AuthResultType.redirected</code> | |
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) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [AuthRedirected](./kibana-plugin-server.authredirected.md) &gt; [type](./kibana-plugin-server.authredirected.type.md)

## AuthRedirected.type property

<b>Signature:</b>

```typescript
type: AuthResultType.redirected;
```
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) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [AuthRedirectedParams](./kibana-plugin-server.authredirectedparams.md) &gt; [headers](./kibana-plugin-server.authredirectedparams.headers.md)

## AuthRedirectedParams.headers property

Headers to attach for auth redirect. Must include "location" header

<b>Signature:</b>

```typescript
headers: ResponseHeaders;
```
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) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [AuthRedirectedParams](./kibana-plugin-server.authredirectedparams.md)

## AuthRedirectedParams interface

Result of auth redirection.

<b>Signature:</b>

```typescript
export interface AuthRedirectedParams
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [headers](./kibana-plugin-server.authredirectedparams.headers.md) | <code>ResponseHeaders</code> | Headers to attach for auth redirect. Must include "location" header |

Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
<b>Signature:</b>

```typescript
export declare type AuthResult = Authenticated | AuthNotHandled;
export declare type AuthResult = Authenticated | AuthNotHandled | AuthRedirected;
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ export declare enum AuthResultType
| --- | --- | --- |
| authenticated | <code>&quot;authenticated&quot;</code> | |
| notHandled | <code>&quot;notHandled&quot;</code> | |
| redirected | <code>&quot;redirected&quot;</code> | |

Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export interface AuthToolkit
| Property | Type | Description |
| --- | --- | --- |
| [authenticated](./kibana-plugin-server.authtoolkit.authenticated.md) | <code>(data?: AuthResultParams) =&gt; AuthResult</code> | Authentication is successful with given credentials, allow request to pass through |
| [notHandled](./kibana-plugin-server.authtoolkit.nothandled.md) | <code>() =&gt; AuthResult</code> | User has no credentials |
| [notHandled](./kibana-plugin-server.authtoolkit.nothandled.md) | <code>() =&gt; AuthResult</code> | User has no credentials. Allows user to access a resource when authRequired: 'optional' Rejects a request when authRequired: true |
| [redirected](./kibana-plugin-server.authtoolkit.redirected.md) | <code>(headers: ResponseHeaders) =&gt; AuthResult</code> | Redirect user to IdP when authRequired: true Allows user to access a resource without redirection when authRequired: 'optional' |

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## AuthToolkit.notHandled property

User has no credentials
User has no credentials. Allows user to access a resource when authRequired: 'optional' Rejects a request when authRequired: true

<b>Signature:</b>

Expand Down
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) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [AuthToolkit](./kibana-plugin-server.authtoolkit.md) &gt; [redirected](./kibana-plugin-server.authtoolkit.redirected.md)

## AuthToolkit.redirected property

Redirect user to IdP when authRequired: true Allows user to access a resource without redirection when authRequired: 'optional'

<b>Signature:</b>

```typescript
redirected: (headers: ResponseHeaders) => AuthResult;
```
2 changes: 2 additions & 0 deletions docs/development/core/server/kibana-plugin-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [AssistantAPIClientParams](./kibana-plugin-server.assistantapiclientparams.md) | |
| [Authenticated](./kibana-plugin-server.authenticated.md) | |
| [AuthNotHandled](./kibana-plugin-server.authnothandled.md) | |
| [AuthRedirected](./kibana-plugin-server.authredirected.md) | |
| [AuthRedirectedParams](./kibana-plugin-server.authredirectedparams.md) | Result of auth redirection. |
| [AuthResultParams](./kibana-plugin-server.authresultparams.md) | Result of successful authentication. |
| [AuthToolkit](./kibana-plugin-server.authtoolkit.md) | A tool set defining an outcome of Auth interceptor for incoming request. |
| [CallAPIOptions](./kibana-plugin-server.callapioptions.md) | The set of options that defines how API call should be made and result be processed. |
Expand Down
18 changes: 16 additions & 2 deletions src/core/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,18 @@ export interface AuthNotHandled {
}

// @public (undocumented)
export type AuthResult = Authenticated | AuthNotHandled;
export interface AuthRedirected extends AuthRedirectedParams {
// (undocumented)
type: AuthResultType.redirected;
}

// @public
export interface AuthRedirectedParams {
headers: ResponseHeaders;
}

// @public (undocumented)
export type AuthResult = Authenticated | AuthNotHandled | AuthRedirected;

// @public
export interface AuthResultParams {
Expand All @@ -439,7 +450,9 @@ export enum AuthResultType {
// (undocumented)
authenticated = "authenticated",
// (undocumented)
notHandled = "notHandled"
notHandled = "notHandled",
// (undocumented)
redirected = "redirected"
}

// @public
Expand All @@ -453,6 +466,7 @@ export enum AuthStatus {
export interface AuthToolkit {
authenticated: (data?: AuthResultParams) => AuthResult;
notHandled: () => AuthResult;
redirected: (headers: ResponseHeaders) => AuthResult;
}

// @public
Expand Down

0 comments on commit c5cb1fd

Please sign in to comment.