IsAuthenticationSkipped returns whether the method is exempted from authentication.
(fullMethodName string, authContext *common.AuthContext)
| 8 | |
| 9 | // IsAuthenticationSkipped returns whether the method is exempted from authentication. |
| 10 | func IsAuthenticationSkipped(fullMethodName string, authContext *common.AuthContext) bool { |
| 11 | // "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo" is used |
| 12 | // for reflection. |
| 13 | if strings.HasPrefix(fullMethodName, "/grpc.reflection") { |
| 14 | return true |
| 15 | } |
| 16 | return authContext.AllowWithoutCredential |
| 17 | } |
no outgoing calls
no test coverage detected