MCPcopy
hub / github.com/grpc/grpc-go / getSecurityLevelFromAuthInfo

Function getSecurityLevelFromAuthInfo

credentials/local/local_test.go:81–88  ·  view source on GitHub ↗
(ai credentials.AuthInfo)

Source from the content-addressed store, hash-verified

79type serverHandshake func(net.Conn) (credentials.AuthInfo, error)
80
81func getSecurityLevelFromAuthInfo(ai credentials.AuthInfo) credentials.SecurityLevel {
82 if c, ok := ai.(interface {
83 GetCommonAuthInfo() credentials.CommonAuthInfo
84 }); ok {
85 return c.GetCommonAuthInfo().SecurityLevel
86 }
87 return credentials.InvalidSecurityLevel
88}
89
90// Server local handshake implementation.
91func serverLocalHandshake(conn net.Conn) (credentials.AuthInfo, error) {

Callers 1

serverAndClientHandshakeFunction · 0.85

Calls 1

GetCommonAuthInfoMethod · 0.65

Tested by

no test coverage detected