Skip to content

Commit badae85

Browse files
committed
u
1 parent 71c6043 commit badae85

25 files changed

+460
-1381
lines changed

internal/httpclient/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ Class | Method | HTTP request | Description
8989
*AdminApi* | [**GetIdentity**](docs/AdminApi.md#getidentity) | **Get** /identities/{id} | Get an Identity
9090
*AdminApi* | [**GetSchema**](docs/AdminApi.md#getschema) | **Get** /schemas/{id} |
9191
*AdminApi* | [**GetSelfServiceError**](docs/AdminApi.md#getselfserviceerror) | **Get** /self-service/errors | Get User-Facing Self-Service Errors
92-
*AdminApi* | [**GetSelfServiceLoginFlow**](docs/AdminApi.md#getselfserviceloginflow) | **Get** /self-service/login/flows | Get Login Flow
93-
*AdminApi* | [**GetSelfServiceRecoveryFlow**](docs/AdminApi.md#getselfservicerecoveryflow) | **Get** /self-service/recovery/flows | Get Recovery Flow
94-
*AdminApi* | [**GetSelfServiceRegistrationFlow**](docs/AdminApi.md#getselfserviceregistrationflow) | **Get** /self-service/registration/flows | Get Registration Flow
95-
*AdminApi* | [**GetSelfServiceSettingsFlow**](docs/AdminApi.md#getselfservicesettingsflow) | **Get** /self-service/settings/flows | Get Settings Flow
96-
*AdminApi* | [**GetSelfServiceVerificationFlow**](docs/AdminApi.md#getselfserviceverificationflow) | **Get** /self-service/verification/flows | Get Verification Flow
9792
*AdminApi* | [**GetVersion**](docs/AdminApi.md#getversion) | **Get** /version | Return Running Software Version.
9893
*AdminApi* | [**IsAlive**](docs/AdminApi.md#isalive) | **Get** /health/alive | Check HTTP Server Status
9994
*AdminApi* | [**IsReady**](docs/AdminApi.md#isready) | **Get** /health/ready | Check HTTP Server and Database Status

internal/httpclient/api/openapi.yaml

Lines changed: 75 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -643,14 +643,29 @@ paths:
643643
/self-service/login/flows:
644644
get:
645645
description: |-
646-
This endpoint returns a login flow's context with, for example, error details and other information.
647-
648646
:::info
649647
650648
This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future.
651649
652650
:::
653651
652+
This endpoint returns a login flow's context with, for example, error details and other information.
653+
654+
Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
655+
For AJAX requests you must ensure that cookies are included in the request or requests will fail.
656+
657+
If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
658+
and you need to forward the incoming HTTP Cookie header to this endpoint:
659+
660+
```js
661+
pseudo-code example
662+
router.get('/login', async function (req, res) {
663+
const flow = await client.getSelfServiceLoginFlow(req.header.get('cookie'), req.query['flow'])
664+
665+
res.render('login', flow)
666+
})
667+
```
668+
654669
More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
655670
operationId: getSelfServiceLoginFlow
656671
parameters:
@@ -666,6 +681,18 @@ paths:
666681
schema:
667682
type: string
668683
style: form
684+
- description: |-
685+
HTTP Cookie
686+
687+
When using the SDK on the server side you must include the HTTP Cookie Header
688+
originally sent to your HTTP handler here.
689+
explode: false
690+
in: header
691+
name: cookies
692+
required: false
693+
schema:
694+
type: string
695+
style: simple
669696
responses:
670697
"200":
671698
content:
@@ -700,7 +727,6 @@ paths:
700727
summary: Get Login Flow
701728
tags:
702729
- public
703-
- admin
704730
/self-service/logout:
705731
post:
706732
description: |-
@@ -1012,6 +1038,21 @@ paths:
10121038
10131039
This endpoint returns a recovery flow's context with, for example, error details and other information.
10141040
1041+
Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
1042+
For AJAX requests you must ensure that cookies are included in the request or requests will fail.
1043+
1044+
If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
1045+
and you need to forward the incoming HTTP Cookie header to this endpoint:
1046+
1047+
```js
1048+
pseudo-code example
1049+
router.get('/recovery', async function (req, res) {
1050+
const flow = await client.getSelfServiceRecoveryFlow(req.header.get('cookie'), req.query['flow'])
1051+
1052+
res.render('recovery', flow)
1053+
})
1054+
```
1055+
10151056
More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).
10161057
operationId: getSelfServiceRecoveryFlow
10171058
parameters:
@@ -1055,7 +1096,6 @@ paths:
10551096
summary: Get Recovery Flow
10561097
tags:
10571098
- public
1058-
- admin
10591099
/self-service/recovery/methods/link:
10601100
post:
10611101
description: |-
@@ -1298,14 +1338,29 @@ paths:
12981338
/self-service/registration/flows:
12991339
get:
13001340
description: |-
1301-
This endpoint returns a registration flow's context with, for example, error details and other information.
1302-
13031341
:::info
13041342
13051343
This endpoint is EXPERIMENTAL and subject to potential breaking changes in the future.
13061344
13071345
:::
13081346
1347+
This endpoint returns a registration flow's context with, for example, error details and other information.
1348+
1349+
Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
1350+
For AJAX requests you must ensure that cookies are included in the request or requests will fail.
1351+
1352+
If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
1353+
and you need to forward the incoming HTTP Cookie header to this endpoint:
1354+
1355+
```js
1356+
pseudo-code example
1357+
router.get('/registration', async function (req, res) {
1358+
const flow = await client.getSelfServiceRegistrationFlow(req.header.get('cookie'), req.query['flow'])
1359+
1360+
res.render('registration', flow)
1361+
})
1362+
```
1363+
13091364
More information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).
13101365
operationId: getSelfServiceRegistrationFlow
13111366
parameters:
@@ -1355,7 +1410,6 @@ paths:
13551410
summary: Get Registration Flow
13561411
tags:
13571412
- public
1358-
- admin
13591413
/self-service/settings:
13601414
post:
13611415
description: |-
@@ -1644,7 +1698,6 @@ paths:
16441698
summary: Get Settings Flow
16451699
tags:
16461700
- public
1647-
- admin
16481701
/self-service/verification:
16491702
post:
16501703
description: |-
@@ -1807,6 +1860,20 @@ paths:
18071860
18081861
This endpoint returns a verification flow's context with, for example, error details and other information.
18091862
1863+
Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header.
1864+
For AJAX requests you must ensure that cookies are included in the request or requests will fail.
1865+
1866+
If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
1867+
and you need to forward the incoming HTTP Cookie header to this endpoint:
1868+
1869+
```js
1870+
pseudo-code example
1871+
router.get('/recovery', async function (req, res) {
1872+
const flow = await client.getSelfServiceVerificationFlow(req.header.get('cookie'), req.query['flow'])
1873+
1874+
res.render('verification', flow)
1875+
})
1876+
18101877
More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
18111878
operationId: getSelfServiceVerificationFlow
18121879
parameters:
@@ -1850,7 +1917,6 @@ paths:
18501917
summary: Get Verification Flow
18511918
tags:
18521919
- public
1853-
- admin
18541920
/sessions/whoami:
18551921
get:
18561922
description: |-

0 commit comments

Comments
 (0)