Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c83a2a09
authored
2014-08-28 10:21:32 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
modify the comments
1 parent
50a21d60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
plugins/apiauth/apiauth.go
plugins/apiauth/apiauth.go
View file @
c83a2a0
...
...
@@ -13,6 +13,7 @@
// limitations under the License.
// Package apiauth provides handlers to enable apiauth support.
//
// Simple Usage:
// import(
// "github.com/astaxie/beego"
...
...
@@ -29,24 +30,26 @@
//
// func getAppSecret(appid string) string {
// // get appsecret by appid
//
// maybe store in configure, maybe in database
//
// maybe store in configure, maybe in database
// }
//
// beego.InsertFilter("*", beego.BeforeRouter,apiauth.APIAuthWithFunc(getAppSecret, 360))
//
// in the request user should include these params in the query
// Infomation:
//
// In the request user should include these params in the query
//
//
1. appid
// 1. appid
//
// appid is asigned to the application
//
//
2. signature
// 2. signature
//
//
get the signature use apiauth.Signature()
// get the signature use apiauth.Signature()
//
//
>>> should
use url.QueryEscape()
//
when you send to server remember
use url.QueryEscape()
//
//
3. timestamp:
// 3. timestamp:
//
// send the request time, the format is yyyy-mm-dd HH:ii:ss
//
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment