How to configure Web API in GrandNode
First of all we need to enable Web API in appsettings.json file. You will find it in App_Data directory in main directory of GrandNode. Edit appsettings.json file.
Enabled - True/False. Specify whether API is enabled or not.
SecretKey - Enter your secret key.
ValidateIssuer - True/False.
ValidIssuer - Specify the provider of the token.
ValidateAudience - True/False.
ValidAudience - Specify the audience. It's client, i.e the receiving party.
ValidateLifetime - True/False.
ValidateIssuerSigningKey - True/False.
ExpiryInMinutes - Specify the expiration time of token.
SystemModel - True/False.
Please note that you need to restart application after each change in appsettings.json file.
To show you how to authorize guest user I will use a Postman in free plan. Open it and create new request.
After save you will see a new window. We need to modify some things in it.
We need to change the request type from GET to POST.
Then you need to provide a request URL - it will be http://yourstore.com/tokenweb/guest.
In the Auth tab, set Auth type to No Auth.
In the next tab we need to add new Header.
In the Key field enter the Content-Type, in Value field enter the application/json, description is empty.
And that's all. Just press the "Send" button and if do everything correctly you will see generated token.
It's token which you will use to Authenticate your requests.