forked from laravel/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request laravel#40 from eurides-eu/feature/add-authenticat…
…ion-docs Feature/add authentication docs
- Loading branch information
Showing
4 changed files
with
137 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,119 @@ info: | |
version: "1.0.0" | ||
title: "Eurides API" | ||
host: "develop.eurides.mwlhq.com" | ||
basePath: "/" | ||
basePath: "/api" | ||
schemes: | ||
- "http" | ||
paths: | ||
/signin: | ||
post: | ||
tags: | ||
- "Authentication" | ||
summary: "Request a passwordless login code via email" | ||
description: "" | ||
produces: | ||
- "application/json" | ||
parameters: | ||
- in: "body" | ||
name: "body" | ||
description: "Email of the user that needs a login code" | ||
required: true | ||
schema: | ||
type: object | ||
properties: | ||
email: | ||
type: "string" | ||
example: "[email protected]" | ||
responses: | ||
200: | ||
description: "Email was sent" | ||
422: | ||
description: "" | ||
schema: | ||
$ref: "#/definitions/ErrorResponse" | ||
/signin/code: | ||
post: | ||
tags: | ||
- "Authentication" | ||
summary: "Get an access token in exchange for a passwordless login code" | ||
description: "" | ||
produces: | ||
- "application/json" | ||
parameters: | ||
- in: "body" | ||
name: "body" | ||
description: "Passwordless login code received via email" | ||
required: true | ||
schema: | ||
type: object | ||
properties: | ||
code: | ||
type: "string" | ||
example: "1234abcd" | ||
responses: | ||
200: | ||
description: "" | ||
schema: | ||
type: object | ||
properties: | ||
accessToken: | ||
type: "string" | ||
example: "abcdefghijklmnopqrstuvwxyz" | ||
422: | ||
description: "" | ||
schema: | ||
$ref: "#/definitions/ErrorResponse" | ||
/oauth/token: | ||
post: | ||
tags: | ||
- "Authentication" | ||
summary: "Get an access token using oAuth2 client_credentials grant" | ||
description: "" | ||
produces: | ||
- "application/json" | ||
parameters: | ||
- in: "body" | ||
name: "body" | ||
description: "Client credentials of the organisation" | ||
required: true | ||
schema: | ||
type: object | ||
properties: | ||
grant_type: | ||
type: "string" | ||
example: "client_credentials" | ||
client_id: | ||
type: "string" | ||
example: "1233" | ||
client_secret: | ||
type: "string" | ||
example: "abcd1234" | ||
responses: | ||
200: | ||
description: "" | ||
schema: | ||
type: object | ||
properties: | ||
token_type: | ||
type: "string" | ||
example: "Bearer" | ||
expires_in: | ||
type: "number" | ||
example: 604799 | ||
access_token: | ||
type: "string" | ||
example: "abcdefghijklmnopqrstuvwxyz" | ||
401: | ||
description: "" | ||
schema: | ||
type: object | ||
properties: | ||
error: | ||
type: "string" | ||
example: "Invalid client" | ||
message: | ||
type: "string" | ||
example: "Client authentication failed" | ||
/users/me: | ||
get: | ||
tags: | ||
|
@@ -1431,6 +1540,20 @@ definitions: | |
page: | ||
type: "integer" | ||
example: 2 | ||
ErrorResponse: | ||
type: "object" | ||
properties: | ||
message: | ||
type: "string" | ||
example: "The given data is invalid" | ||
errors: | ||
type: "array" | ||
items: | ||
type: "object" | ||
properties: | ||
email: | ||
type: "string" | ||
example: "The selected email is invalid." | ||
Subscription: | ||
type: "object" | ||
required: | ||
|
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