(ctx context.Context, uri ...string)
| 162 | } |
| 163 | |
| 164 | func (d *dualPerRPCCreds) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) { |
| 165 | ri, ok := credentials.RequestInfoFromContext(ctx) |
| 166 | if !ok { |
| 167 | return nil, fmt.Errorf("request info not found from context") |
| 168 | } |
| 169 | if authType := ri.AuthInfo.AuthType(); authType == "alts" { |
| 170 | return d.altsPerRPCCreds.GetRequestMetadata(ctx, uri...) |
| 171 | } |
| 172 | // This ensures backward compatibility even if authType is not "tls". |
| 173 | return d.perRPCCreds.GetRequestMetadata(ctx, uri...) |
| 174 | } |
| 175 | |
| 176 | func (d *dualPerRPCCreds) RequireTransportSecurity() bool { |
| 177 | return d.altsPerRPCCreds.RequireTransportSecurity() || d.perRPCCreds.RequireTransportSecurity() |
nothing calls this directly
no test coverage detected