From f0b752fe2f59cd6d39d4f6c8321b62525f702f7e Mon Sep 17 00:00:00 2001 From: sshakndr Date: Mon, 3 Feb 2025 12:28:59 +0700 Subject: [PATCH] docs(go): configure jwt --- web/documentserver-example/go/README.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/web/documentserver-example/go/README.md b/web/documentserver-example/go/README.md index 190a8c14..17c24b8b 100644 --- a/web/documentserver-example/go/README.md +++ b/web/documentserver-example/go/README.md @@ -48,7 +48,26 @@ export PATH=$PATH:$GOPATH/bin export PATH=$PATH:/usr/local/go/bin ``` -### Step 5. Start the application +### Step 5. Configure JWT + +Open the *config/configuration.json* file and enable JWT: + +``` +{ + "JWT_IS_ENABLED" : true, +} +``` + +Also, [specify the same secret key](https://helpcenter.onlyoffice.com/installation/docs-configure-jwt.aspx) as used in your Document Server: + +``` +{ + "JWT_SECRET" : "secret", +} +``` + + +### Step 6. Start the application 1. Go to the project root. 2. Run: @@ -57,6 +76,6 @@ export PATH=$PATH:/usr/local/go/bin ``` 3. In your browser go to **server.address** and **server.port**: -### Step 6. Check accessibility +### Step 7. Check accessibility In case the example and Document Server are installed on different computers, make sure that your server with the example installed has access to the Document Server with the address which you specify instead of **documentserver** in the configuration files.