diff --git a/credentials/credentials.go b/credentials/credentials.go index 82aadff8..681f64e4 100644 --- a/credentials/credentials.go +++ b/credentials/credentials.go @@ -87,20 +87,6 @@ type AuthInfo interface { 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 66a8d951..c1b48e8c 100644 --- a/transport/http2_client.go +++ b/transport/http2_client.go @@ -245,7 +245,6 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea // 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 a57bff93..f0746383 100644 --- a/transport/http2_server.go +++ b/transport/http2_server.go @@ -175,7 +175,6 @@ func (t *http2Server) operateHeaders(hDec *hpackDecoder, s *Stream, frame header // 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