MCPcopy Create free account
hub / github.com/bytebase/bytebase / IsAuthenticationSkipped

Function IsAuthenticationSkipped

backend/api/auth/config.go:10–17  ·  view source on GitHub ↗

IsAuthenticationSkipped returns whether the method is exempted from authentication.

(fullMethodName string, authContext *common.AuthContext)

Source from the content-addressed store, hash-verified

8
9// IsAuthenticationSkipped returns whether the method is exempted from authentication.
10func 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}

Callers 4

doACLCheckMethod · 0.92
doIAMPermissionCheckFunction · 0.92
WrapUnaryMethod · 0.85
WrapStreamingHandlerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected