mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
update auth init
This commit is contained in:
parent
a4d324a361
commit
1636bf1548
2 changed files with 9 additions and 4 deletions
|
|
@ -7,19 +7,20 @@ import (
|
|||
"github.com/infinite-iroha/touka"
|
||||
)
|
||||
|
||||
func Init(cfg *config.Config) {
|
||||
func ListInit(cfg *config.Config) error {
|
||||
if cfg.Blacklist.Enabled {
|
||||
err := InitBlacklist(cfg)
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
return err
|
||||
}
|
||||
}
|
||||
if cfg.Whitelist.Enabled {
|
||||
err := InitWhitelist(cfg)
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func AuthHandler(c *touka.Context, cfg *config.Config) (isValid bool, err error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue