Home > Net >  Have several small demand, need to master knowledge? POS, JSON, the Access Token
Have several small demand, need to master knowledge? POS, JSON, the Access Token

Time:09-21

1. All requests are as follows: POST

All return type as JSON string

All return to the basic structure is as follows

"Success: Boolean type," desc ", "description", "result" : the json or array}

2. The authorization to get Access Token

In addition to all of the interface to all needs to provide a valid access token parameters, in order to authenticate

Note: please set the token expiry time 12 hours

If all of the interface of the request of the token, return to the results of DSC must contain "token_expired English
"
Logo, determine whether to need to facilitate access to token


Already have a website, you need to add more than demand, adjust my data in the past, equivalent to other web sites use web apis to implement?

CodePudding user response:

Of course, WebApi is preferred

CodePudding user response:

Based on the JWT WebApi

CodePudding user response:

, but is not necessarily the WebApi WebApi is the most convenient,
If the project is already written, just want to add the feature, just before each class the righteousness and attribute identification, function is a function call before you call class method validation,
See
[RequestAuthorize]
Or
[the Authorize]