Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thibaut Felten
projet-cdaw
Commits
ae807c23
Commit
ae807c23
authored
Nov 22, 2020
by
thibaut-felten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc 12
parent
14ede517
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
26 deletions
+19
-26
config.php
backend/MVC/config/config.php
+10
-10
login.md
backend/MVC/doc/login.md
+9
-16
No files found.
backend/MVC/config/config.php
View file @
ae807c23
...
...
@@ -2,19 +2,19 @@
// Config Eden
define
(
'DB_HOST'
,
'localhost'
);
define
(
'DB_PORT'
,
3306
);
define
(
'DB_DBNAME'
,
'thibaut_felten'
);
define
(
'DB_USER'
,
'thibaut.felten'
);
define
(
'DB_PASSWORD'
,
'YpIaegvG'
);
//
define('DB_HOST','localhost');
//
define('DB_PORT',3306);
//
define('DB_DBNAME','thibaut_felten');
//
define('DB_USER','thibaut.felten');
//
define('DB_PASSWORD','YpIaegvG');
//Config local
//
define('DB_HOST','localhost');
//
define('DB_PORT',3306);
//
define('DB_DBNAME','dbtest');
//
define('DB_USER','root');
//
define('DB_PASSWORD','root');
define
(
'DB_HOST'
,
'localhost'
);
define
(
'DB_PORT'
,
3306
);
define
(
'DB_DBNAME'
,
'dbtest'
);
define
(
'DB_USER'
,
'root'
);
define
(
'DB_PASSWORD'
,
'root'
);
define
(
'JWT_BACKEND_KEY'
,
'6d8HbcZndVGNAbo4Ih1TGaKcuA1y2BKs-I5CmP'
);
define
(
'JWT_ISSUER'
,
$_SERVER
[
'HTTP_HOST'
]
.
$_SERVER
[
'CONTEXT_PREFIX'
]);
\ No newline at end of file
backend/MVC/doc/login.md
View file @
ae807c23
...
...
@@ -4,7 +4,7 @@
Used to collect a Token for a registered User.
**URL**
:
`/api/login/`
**URL**
:
`/api
.php
/login/`
**Method**
:
`POST`
...
...
@@ -14,8 +14,8 @@ Used to collect a Token for a registered User.
```
json
{
"
username
"
:
"[valid email address]"
,
"p
assword"
:
"[password in plain text
]"
"
login
"
:
"[valid email address]"
,
"p
wd"
:
"[encrypted password
]"
}
```
...
...
@@ -23,8 +23,8 @@ Used to collect a Token for a registered User.
```
json
{
"username"
:
"
iloveauth
@example.com"
,
"password"
:
"
abcd1234
"
"username"
:
"
email
@example.com"
,
"password"
:
"
$2y$12$K7wi3XvwEZuODOGmwOgeKO1oBFhIjjuZJpmzYjMpDQ5BB9YIBAJ/6
"
}
```
...
...
@@ -36,22 +36,15 @@ Used to collect a Token for a registered User.
```
json
{
"
token"
:
"93144b288eb1fdccbe46d6fc0f241a51766ecd3d
"
"
jwt_token"
:
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDYwNjA5MzMsImV4cCI6MTYwNjA2NDUzMywiaXNzIjoibG9jYWxob3N0IiwiZGF0YSI6eyJpZCI6IjMiLCJmaXJzdG5hbWUiOiJ0ZXN0IiwibGFzdG5hbWUiOiJ0ZXN0IiwiZW1haWwiOiJlbWFpbHRlc3RAdGVzdC5jb20ifX0.pj5SnrOUA45Fleb19D7MFz9Xc2Isx6km-Ov2gG2U_d0
"
}
```
## Error Response
**Condition**
:
If 'username' and 'password' combination is wrong
.
**Condition**
:
Missing field pwd or login
.
**Code**
:
`4
00 BAD REQUEST
`
**Code**
:
`4
22
`
**Content**
:
**Content**
:
`login and pwd fields are mandatory`
```
json
{
"non_field_errors"
:
[
"Unable to login with provided credentials."
]
}
```
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment