Files
pixiv_downloader/doc/api/auth.md
2022-10-19 04:40:05 +00:00

1.4 KiB

中文简体

Authentication related APIs

Get server authentication status

  • route: /auth/status or /api/auth/status
  • method: GET or POST
  • auth: Not needed
  • parameters: None
  • Example of the response
  • JSON schema of the response

Get server public key

  • route: /auth/pubkey or /api/auth/pubkey
  • method: GET or POST
  • auth: Not needed
  • parameters: None
  • Example of the response
  • JSON schema of the response

User management

Add user

  • route: /auth/user/add or /api/auth/user/add
  • method: GET or POST
  • RESTful: PUT /api/auth/userPUT /auth/user
  • auth: Needed (If has_root_user in server status is true, authentication is not needed. Admin privilege is needed)
  • parameters:
Name Type Required Description
name string Yes User's name
username string Yes User's name (unique and used to login)
password string Yes User's password (RSA encrypted)
is_admin boolean No Whether the user is an admin Default: false. Root user will always have admin privillege.
id uint64 No The user's id which want to be modified