Crates.io | ras_auth |
lib.rs | ras_auth |
version | 0.1.0 |
source | src |
created_at | 2022-03-26 20:33:43.43483 |
updated_at | 2022-03-26 20:33:43.43483 |
description | Microservice for authentication, used together with ras_service |
homepage | |
repository | https://github.com/Ailysom/ras-auth.git |
max_upload_size | |
id | 556967 |
size | 58,146 |
Microservice for authentication, used together with ras_service
Sqlite table: create table users(name text primary key, password text, role int).
Registration: POST { "name": "some_name", "password": "some_password" }
Login (generate new access and refresh tokens): POST { "name": "some_name", "password": "some_password" }
Refresh (generate new access and refresh tokens): POST { "token": "some_refresh_token" }
Change role (allow on 0000_0110 bitmask): POST { "token": "some_access_token", "name": "some_name", "role": "2" }
Get public key (allow on 0000_0001 bitmask): POST { "token": "some_access_token" }