mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-15 12:34:44 +00:00
* Autogenerate services.m3o.com * Openapi for all * Gen * Fix * Whaat * Fix dep * Fix * Hmm * Install make * Debug * Debug 1 * Location -> locations * Fix * Intall protoc gen micro * F * F * F * Push * Rename secret * Fix npm install * Fix script * Fix v2 * Ignore errors * Ignore v2 * F * F * F * Docs index * Add hugo theme * Hugo tania fixes * Change gen * Change gen 2 * Install hugo * Change gen * Gen fix * Change hugo install * Change hugo install * CNAME * Change articles wording * Tiny fix * Fix gen * Redoc it all * Fix gen * Fixing up protos * Fix proto * Fix gen * Fix * Trigger build * Fix copy * Openapi docs * Flatten * Changes * No date vol2 * Changes * Add make to chat * Fixes * Change * api spec * replace RSS * fix link * Dont continue on error * increase the width * use micro at master * change box colours * move some things * Pushing new readmes to see how they look like * Add skip file * Readmes * Nicer api link * Remove stutter * FIx mistake * set service font weight * Messages readme fix * add other font bold * Notes * Remove post from url * Revert "Remove post from url" This reverts commit 5fea2c23d0bafa910f5dc4d4cc63f71f578530e3. * move exampleSite to site * replace exampleSite with site * update readme * use filename for post * update index * Add source urls * set source as params * set source as params * Fix entries * Generator in go * Fixes to generator * F * Change doc gen * FIx cname * Fixing protos * Change to makefiles * Fix gen script Co-authored-by: Asim Aslam <asim@aslam.me>
74 lines
1.6 KiB
Markdown
74 lines
1.6 KiB
Markdown
A user service for storing accounts and simple auth.
|
|
|
|
# Users Service
|
|
|
|
## Getting started
|
|
|
|
```
|
|
micro run github.com/micro/services/users
|
|
```
|
|
|
|
## Usage
|
|
|
|
User server implements the following RPC Methods
|
|
|
|
Users
|
|
- Create
|
|
- Read
|
|
- Update
|
|
- Delete
|
|
- Search
|
|
- UpdatePassword
|
|
- Login
|
|
- Logout
|
|
- ReadSession
|
|
|
|
|
|
### Create
|
|
|
|
```shell
|
|
micro call users Users.Create '{"id": "ff3c06de-9e43-41c7-9bab-578f6b4ad32b", "username": "asim", "email": "asim@example.com", "password": "password1"}'
|
|
```
|
|
|
|
### Read
|
|
|
|
```shell
|
|
micro call users Users.Read '{"id": "ff3c06de-9e43-41c7-9bab-578f6b4ad32b"}'
|
|
```
|
|
|
|
### Update
|
|
|
|
```shell
|
|
micro call users Users.Update '{"id": "ff3c06de-9e43-41c7-9bab-578f6b4ad32b", "username": "asim", "email": "asim+update@example.com"}'
|
|
```
|
|
|
|
### Update Password
|
|
|
|
```shell
|
|
micro call users Users.UpdatePassword '{"userId": "ff3c06de-9e43-41c7-9bab-578f6b4ad32b", "oldPassword": "password1", "newPassword": "newpassword1", "confirmPassword": "newpassword1" }'
|
|
```
|
|
|
|
### Delete
|
|
|
|
```shell
|
|
micro call users Users.Delete '{"id": "ff3c06de-9e43-41c7-9bab-578f6b4ad32b"}'
|
|
```
|
|
|
|
### Login
|
|
|
|
```shell
|
|
micro call users Users.Login '{"username": "asim", "password": "password1"}'
|
|
```
|
|
|
|
### Read Session
|
|
|
|
```shell
|
|
micro call users Users.ReadSession '{"sessionId": "sr7UEBmIMg5hYOgiljnhrd4XLsnalNewBV9KzpZ9aD8w37b3jRmEujGtKGcGlXPg1yYoSHR3RLy66ugglw0tofTNGm57NrNYUHsFxfwuGC6pvCn8BecB7aEF6UxTyVFq"}'
|
|
```
|
|
|
|
### Logout
|
|
|
|
```shell
|
|
micro call users Users.Logout '{"sessionId": "sr7UEBmIMg5hYOgiljnhrd4XLsnalNewBV9KzpZ9aD8w37b3jRmEujGtKGcGlXPg1yYoSHR3RLy66ugglw0tofTNGm57NrNYUHsFxfwuGC6pvCn8BecB7aEF6UxTyVFq"}'
|
|
```
|