From e775b45fc5d5a42692c850498e9f00441820fcd8 Mon Sep 17 00:00:00 2001 From: numinex Date: Sat, 14 Oct 2023 12:50:44 +0200 Subject: [PATCH] Update README.md version-0.0.17 --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f956a3..7660341 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ var response = await bus.LoginUser(new LoginUserRequest Password = "iggy", }); ``` -Alternatively, once you've logged in as the root user, you can create another account with optional `Permissions` and use that one instead. +Furthermore, after logging in, you have the option to create an account with customizable `Permissions`. ```c# await bus.CreateUser(new CreateUserRequest { @@ -111,6 +111,24 @@ var response = await bus.LoginUser(new LoginUserRequest Password = "test_user", }); ``` +Alternatively, once you've logged in, you can create a `Personal Access Token` that can be reused for further logins." +```c# +var response = await bus.LoginUser(new LoginUserRequest +{ + Username = "your_username", + Password = "your_password", +}); + +var patResponse = await bus.CreatePersonalAccessTokenAsync(new CreatePersonalAccessTokenRequest +{ + Name = "first-pat", + Expiry = 60, // seconds from creation time +}); +await bus.LoginWithPersonalAccessToken(new LoginWithPersonalAccessToken +{ + Token = patResponse.Token +}); +``` ### Creating first stream and topic In order to create stream use `CreateStreamAsync` method. ```c#