mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 17:30:56 +00:00
APIBaiscAuth is misspelling of APIBasicAuth
Corrected APIBaiscAuth to APIBasicAuth. Maintained old name (forwarding to new one) for those still using the previous API function name.
This commit is contained in:
parent
3224369ac9
commit
ddcd28e67f
@ -72,8 +72,8 @@ import (
|
|||||||
// AppIDToAppSecret is used to get appsecret throw appid
|
// AppIDToAppSecret is used to get appsecret throw appid
|
||||||
type AppIDToAppSecret func(string) string
|
type AppIDToAppSecret func(string) string
|
||||||
|
|
||||||
// APIBaiscAuth use the basic appid/appkey as the AppIdToAppSecret
|
// APIBasicAuth use the basic appid/appkey as the AppIdToAppSecret
|
||||||
func APIBaiscAuth(appid, appkey string) beego.FilterFunc {
|
func APIBasicAuth(appid, appkey string) beego.FilterFunc {
|
||||||
ft := func(aid string) string {
|
ft := func(aid string) string {
|
||||||
if aid == appid {
|
if aid == appid {
|
||||||
return appkey
|
return appkey
|
||||||
@ -83,6 +83,11 @@ func APIBaiscAuth(appid, appkey string) beego.FilterFunc {
|
|||||||
return APISecretAuth(ft, 300)
|
return APISecretAuth(ft, 300)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// APIBaiscAuth calls APIBasicAuth for previous callers
|
||||||
|
func APIBaiscAuth(appid, appkey string) beego.FilterFunc {
|
||||||
|
return APIBaiscAuth(appid, appkey)
|
||||||
|
}
|
||||||
|
|
||||||
// APISecretAuth use AppIdToAppSecret verify and
|
// APISecretAuth use AppIdToAppSecret verify and
|
||||||
func APISecretAuth(f AppIDToAppSecret, timeout int) beego.FilterFunc {
|
func APISecretAuth(f AppIDToAppSecret, timeout int) beego.FilterFunc {
|
||||||
return func(ctx *context.Context) {
|
return func(ctx *context.Context) {
|
||||||
|
Loading…
Reference in New Issue
Block a user