Remove context related functions in credentials
diff --git a/credentials/credentials.go b/credentials/credentials.go
index 82aadff..681f64e 100644
--- a/credentials/credentials.go
+++ b/credentials/credentials.go
@@ -87,20 +87,6 @@
AuthType() string
}
-/*
-type authInfoKey struct{}
-
-// NewContext creates a new context with authInfo attached.
-func NewContext(ctx context.Context, authInfo AuthInfo) context.Context {
- return context.WithValue(ctx, authInfoKey{}, authInfo)
-}
-
-// FromContext returns the authInfo in ctx if it exists.
-func FromContext(ctx context.Context) (authInfo AuthInfo, ok bool) {
- authInfo, ok = ctx.Value(authInfoKey{}).(AuthInfo)
- return
-}
-*/
// TransportAuthenticator defines the common interface for all the live gRPC wire
// protocols and supported transport security protocols (e.g., TLS, SSL).
type TransportAuthenticator interface {
diff --git a/transport/http2_client.go b/transport/http2_client.go
index 66a8d95..c1b48e8 100644
--- a/transport/http2_client.go
+++ b/transport/http2_client.go
@@ -245,7 +245,6 @@
// Attach Auth info if there is any.
if t.authInfo != nil {
pr.AuthInfo = t.authInfo
- //ctx = credentials.NewContext(ctx, t.authInfo)
}
ctx = peer.NewContext(ctx, pr)
authData := make(map[string]string)
diff --git a/transport/http2_server.go b/transport/http2_server.go
index a57bff9..f074638 100644
--- a/transport/http2_server.go
+++ b/transport/http2_server.go
@@ -175,7 +175,6 @@
// Attach Auth info if there is any.
if t.authInfo != nil {
pr.AuthInfo = t.authInfo
- //s.ctx = credentials.NewContext(s.ctx, t.authInfo)
}
s.ctx = peer.NewContext(s.ctx, pr)
// Cache the current stream to the context so that the server application