You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package auth
|
|
|
|
|
|
|
|
type Config struct {
|
|
|
|
SkipPaths []string
|
|
|
|
TokenKey string
|
|
|
|
}
|
|
|
|
|
|
|
|
func DefaultConfig() *Config {
|
|
|
|
return &Config{
|
|
|
|
SkipPaths: []string{
|
|
|
|
"/api/user/profile",
|
|
|
|
"/api/user/disable",
|
|
|
|
"/api/user/enable",
|
|
|
|
"/api/purchase/save",
|
|
|
|
"/api/purchase/user",
|
|
|
|
"/api/purchase/content",
|
|
|
|
"/api/order/create",
|
|
|
|
"/api/order/order_notify/create",
|
|
|
|
"/api/order/create",
|
|
|
|
"/api/coupon/get",
|
|
|
|
"/api/coupon/create",
|
|
|
|
"/api/article/unlock",
|
|
|
|
"/api/article/unlock-article",
|
|
|
|
},
|
|
|
|
TokenKey: "Authorization",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//func DefaultConfig() *Config {
|
|
|
|
// return &Config{
|
|
|
|
// SkipPaths: []string{
|
|
|
|
// "/",
|
|
|
|
// "/home",
|
|
|
|
// "/home/special-column",
|
|
|
|
// "/home/article-detail",
|
|
|
|
// "/mine",
|
|
|
|
// "/mine/login",
|
|
|
|
// "/callback", //openid 回调接口
|
|
|
|
// "/callback_test", //openid 回调测试接口
|
|
|
|
// "/api/order/order_notify", //微信支付回调接口
|
|
|
|
// "/api/auth/image-captcha",
|
|
|
|
// "/api/auth/sms-captcha",
|
|
|
|
// "/api/auth/login-captcha",
|
|
|
|
// "/api/auth/login-password",
|
|
|
|
// "/api/auth/captcha/sms",
|
|
|
|
// "/api/auth/verify-image",
|
|
|
|
// "/api/auth/verify-sms",
|
|
|
|
// "/api/article/all",
|
|
|
|
// },
|
|
|
|
// TokenKey: "Authorization",
|
|
|
|
// }
|
|
|
|
//}
|