Signed-off-by: Nikolai Rodionov <iam@allanger.xyz>
This commit is contained in:
@@ -99,6 +99,7 @@ func (cmd *Server) Run(ctx context.Context) error {
|
||||
tokenCtrl := &controllers.TokenController{
|
||||
DB: db,
|
||||
HashCost: cmd.HashCost,
|
||||
Redis: rdb,
|
||||
}
|
||||
|
||||
accountCtrl := &controllers.AccountController{
|
||||
@@ -136,6 +137,7 @@ func selectorRequireAuth(ctx context.Context, callMeta interceptors.CallMeta) bo
|
||||
return false
|
||||
}
|
||||
serviceName := serviceParts[len(serviceParts)-1]
|
||||
fmt.Println(serviceName)
|
||||
|
||||
if strings.HasPrefix(serviceName, "Public") {
|
||||
return false
|
||||
@@ -145,5 +147,9 @@ func selectorRequireAuth(ctx context.Context, callMeta interceptors.CallMeta) bo
|
||||
return false
|
||||
}
|
||||
|
||||
if strings.Contains(callMeta.Method, "AuthenticateWithToken") {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user