mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-02-10 18:05:10 +08:00
csharp: config request JWT used in functions
This commit is contained in:
@ -55,7 +55,7 @@ namespace OnlineEditorsExample
|
||||
var fileData = jss.Deserialize<Dictionary<string, object>>(body);
|
||||
|
||||
// check if the document token is enabled
|
||||
if (JwtManager.Enabled)
|
||||
if (JwtManager.Enabled && JwtManager.SignatureUseForRequest)
|
||||
{
|
||||
string JWTheader = string.IsNullOrEmpty(WebConfigurationManager.AppSettings["files.docservice.header"]) ? "Authorization" : WebConfigurationManager.AppSettings["files.docservice.header"];
|
||||
|
||||
@ -288,7 +288,7 @@ namespace OnlineEditorsExample
|
||||
}
|
||||
|
||||
// check if a secret key to generate token exists or not
|
||||
if (JwtManager.Enabled)
|
||||
if (JwtManager.Enabled && JwtManager.SignatureUseForRequest)
|
||||
{
|
||||
var payload = new Dictionary<string, object>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user