mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
update format, add additional informations
This commit is contained in:
parent
c2619a1c5d
commit
7e63b2dc17
@ -24,33 +24,46 @@ Login
|
||||
Einloggen über:
|
||||
|
||||
|
||||
# unsecureLogin
|
||||
## unsecureLogin
|
||||
|
||||
POST http://localhost/login_api/unsecureLogin
|
||||
```json
|
||||
data: {"username": "<username>", "password": "<password>"}
|
||||
data: {"email": "max.musterman@gmail.de", "password": "123abcDE&"}
|
||||
```
|
||||
|
||||
Wenn alles okay ist erhältst du:
|
||||
Wenn alles okay ist erhältst du zum Beispiel:
|
||||
```json
|
||||
{"state":"success", "session_id": <session_id as int>, "clientIP":"<client ip of user>",
|
||||
{"state":"success", "session_id": -127182, "clientIP":"52.68.96.58",
|
||||
"user": {
|
||||
"created": <timestamp in seconds>,
|
||||
"disabled": <true|false>, // login will fail if user is disabled
|
||||
"email": "<email>",
|
||||
"email_checked": <true|false>, // true if user has already clicked on email verification code link in his emails
|
||||
"first_name": "<first nme>",
|
||||
"group_alias": "<group alias, z.B. gdd1>",
|
||||
"ident_hash": <int, currently not used>,
|
||||
"last_name": "<last name>",
|
||||
"public_hex": "<64 character hex (contain only a-f and 0-9)>",
|
||||
"role": "<admin|none>", // should be only valid for login-server
|
||||
"username": "<currently not used>",
|
||||
"balance": <Gradido Cent, 4 Nachkommastellen (2 Reserve)>, // 174500 = 17,45 GDD
|
||||
"id": <id in login-server db>,
|
||||
"errorCount": <errors occured in this session, should be normally 0>
|
||||
"created": 1293872400,
|
||||
"disabled": false,
|
||||
"email": "max.musterman@gmail.de",
|
||||
"email_checked": true,
|
||||
"first_name": "Max",
|
||||
"group_alias": "gdd1",
|
||||
"ident_hash": 1829912,
|
||||
"public_hex": "c6e7d6a697fa74d6c247580edf1546989d43487575e21e398abe3cc2094bd63e",
|
||||
"last_name": "Musterman",
|
||||
"role": "none",
|
||||
"username": "",
|
||||
"balance": 174500,
|
||||
"id": 1,
|
||||
"errorCount": 0
|
||||
}}
|
||||
```
|
||||
- clientIP: should be the same as where the js-client is running, else maybe a man-in-the-middle attacks is happening or
|
||||
nginx was wrong configured.
|
||||
- session_id: can be also negative
|
||||
- created: unix timestamp in seconds
|
||||
- disabled: if set to true, login and every transaction must fail. Currently used if use would like to have there account deleted.
|
||||
- email_checked: true if user has already clicked on email verification code link in his emails, needed for tranactions
|
||||
- ident_hash: string hash from email, used for speed up creation validation
|
||||
- public_hex: hexadecimal representation of 32 Byte public key of user [0-9a-f]
|
||||
- role: not intended for future use, just ignore, login-server admin will be independently from community-server admin
|
||||
- username: for later use
|
||||
- balance: Gradido Cent, 4 Nachkommastellen (2 Reserve), 174500 = 17,45 GDD
|
||||
- id: login-server user id, only needed for debugging
|
||||
- errorCount: errors occured in this session, should be normally 0
|
||||
|
||||
Anmelden
|
||||
Registrieren kannst du einen neuen Benutzer mit:
|
||||
@ -60,10 +73,14 @@ Registrieren kannst du einen neuen Benutzer mit:
|
||||
|
||||
POST http://localhost/login_api/createUser
|
||||
```json
|
||||
data: {"email":"<email>", "first_name":"<first name>", "last_name":"<last name>" ,
|
||||
"emailType": 2, "password":"<password>"}
|
||||
data: {"email":"max.musterman@gmail.de", "first_name":"Max", "last_name":"Musterman" ,
|
||||
"emailType": 2, "password":"123abcDE&"}
|
||||
```
|
||||
|
||||
- emailType: control email-text sended with email verification code
|
||||
- 2: default, if user has registered directly
|
||||
- 5: if user was registered by an admin
|
||||
|
||||
Wenn alles okay ist erhältst du:
|
||||
```json
|
||||
{"state":"success"}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user