Skip to content

Conversation

@MakMukhi
Copy link
Contributor

@MakMukhi MakMukhi commented May 9, 2017

No description provided.

@MakMukhi MakMukhi requested review from dfawley and menghanl May 9, 2017 00:32
@menghanl menghanl self-assigned this May 9, 2017
conn.Close()
}
}(conn)
var isSecure bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

group these two with

var(
  ...
)

callAuthData := make(map[string]string)
if callCreds := callHdr.Creds; callCreds != nil {
if !t.isSecure && callCreds.RequireTransportSecurity() {
return nil, streamErrorf(codes.Unauthenticated, "transport: cannot send secure credentials on an insecure channel")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/channel/connection
The word channel is misleading in golang...

if !t.isSecure && callCreds.RequireTransportSecurity() {
return nil, streamErrorf(codes.Unauthenticated, "transport: cannot send secure credentials on an insecure channel")
}
data, err := callCreds.GetRequestMetadata(ctx)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetRequestMetadata also takes parameter uri.

// Check if credentials.PerRPCCredentials were provided via call options.
// Note: if these credentials are provided both via dial options and call
// options, then both sets of credentials will be applied.
callAuthData := make(map[string]string)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make authData a map[string][]string and reuse authData?

@MakMukhi MakMukhi merged commit 88a73d3 into grpc:master May 11, 2017
@menghanl menghanl added 1.4 Type: Feature New features or improvements in behavior labels Jun 7, 2017
@MakMukhi MakMukhi changed the title Adding dial options for PerRPCCredentials Adding call options for PerRPCCredentials Jun 24, 2017
@MakMukhi MakMukhi deleted the rpc_creds_dial_option branch May 4, 2018 02:09
@lock lock bot locked as resolved and limited conversation to collaborators Oct 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Type: Feature New features or improvements in behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants