Update api.md

This commit is contained in:
Maxim Devaev 2020-09-20 00:27:09 +03:00 committed by GitHub
parent 374be8531c
commit 0f33ca1a91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -16,10 +16,10 @@ There are two options here:
``` ```
$ curl -k --user admin:admin https://pikvm/api/auth/check $ curl -k --user admin:admin https://pikvm/api/auth/check
``` ```
#### Session-based (token) auth #### Session-based cookie auth
1. Authorize and get token for the user using `POST /api/auth/login`: 1. Authorize and get token for the user using `POST /api/auth/login`:
``` ```
$ curl -k -vv -X POST --data user=admin --data passwd=admin https://pikvm/api/auth/login $ curl -k -v -X POST --data user=admin --data passwd=admin https://pikvm/api/auth/login
... ...
< Set-Cookie: auth_token=796cb83b11de4fcb749bc1bad14a91fb06dede84672b2f847fef1e988e6900de; Path=/ < Set-Cookie: auth_token=796cb83b11de4fcb749bc1bad14a91fb06dede84672b2f847fef1e988e6900de; Path=/
... ...