move auth interceptor into serverinterceptors

master
kevin 4 years ago committed by kingxt
parent 4f59fd306a
commit d1529fced8

@ -1,4 +1,4 @@
package internal package serverinterceptors
import ( import (
"context" "context"

@ -117,8 +117,8 @@ func setupInterceptors(server internal.Server, c RpcServerConf, metrics *stat.Me
return err return err
} }
server.AddStreamInterceptors(internal.StreamAuthorizeInterceptor(authenticator)) server.AddStreamInterceptors(serverinterceptors.StreamAuthorizeInterceptor(authenticator))
server.AddUnaryInterceptors(internal.UnaryAuthorizeInterceptor(authenticator)) server.AddUnaryInterceptors(serverinterceptors.UnaryAuthorizeInterceptor(authenticator))
} }
return nil return nil

Loading…
Cancel
Save