Skip to content

Commit

Permalink
feat: support json payloads for login and password
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Aug 10, 2020
1 parent 3476b97 commit 354e8b2
Show file tree
Hide file tree
Showing 15 changed files with 734 additions and 221 deletions.
33 changes: 33 additions & 0 deletions .schema/api.swagger.json
Expand Up @@ -435,6 +435,39 @@
}
}
},
"/self-service/api/flows/login": {
"get": {
"description": "This endpoint initializes an API user login flow and returns a new login request. This endpoint\nignores any authentication (cookie, session token) and will always create a new login request.\n\nTo fetch an existing login request, call `/self-service/api/flows/requests/login`.\n\n\u003e This endpoint is NOT INTENDED for Browsers (Chrome, Firefox, ...).\n\nMore 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).",
"schemes": [
"http",
"https"
],
"tags": [
"common",
"public",
"admin"
],
"summary": "Initialize API login user flow",
"operationId": "initializeSelfServiceAPILoginFlow",
"responses": {
"200": {
"description": "loginRequest",
"schema": {
"$ref": "#/definitions/loginRequest"
}
},
"302": {
"description": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is\ntypically 201."
},
"500": {
"description": "genericError",
"schema": {
"$ref": "#/definitions/genericError"
}
}
}
}
},
"/self-service/browser/flows/login": {
"get": {
"description": "This endpoint initializes a browser-based user login flow. Once initialized, the browser will be redirected to\n`selfservice.flows.login.ui_url` with the request ID set as a query parameter. If a valid user session exists already, the browser will be\nredirected to `urls.default_redirect_url`.\n\n\u003e This endpoint is NOT INTENDED for API clients and only works\nwith browsers (Chrome, Firefox, ...).\n\nMore 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).",
Expand Down
4 changes: 2 additions & 2 deletions cmd/daemon/serve.go
Expand Up @@ -128,8 +128,8 @@ func sqa(cmd *cobra.Command, d driver.Driver) *metricsx.Service {
password.RegistrationPath,
password.LoginPath,
oidc.BasePath,
login.BrowserLoginPath,
login.BrowserLoginRequestsPath,
login.BrowserInitPath,
login.BrowserRequestsPath,
logout.BrowserLogoutPath,
registration.BrowserRegistrationPath,
registration.BrowserRegistrationRequestsPath,
Expand Down
45 changes: 45 additions & 0 deletions internal/httpclient/client/common/common_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 354e8b2

Please sign in to comment.