(ctx context.Context, _ ...string)
| 128 | } |
| 129 | |
| 130 | func (oa oauthAccess) GetRequestMetadata(ctx context.Context, _ ...string) (map[string]string, error) { |
| 131 | ri, _ := credentials.RequestInfoFromContext(ctx) |
| 132 | if err := credentials.CheckSecurityLevel(ri.AuthInfo, credentials.PrivacyAndIntegrity); err != nil { |
| 133 | return nil, fmt.Errorf("unable to transfer oauthAccess PerRPCCredentials: %v", err) |
| 134 | } |
| 135 | return map[string]string{ |
| 136 | "authorization": oa.token.Type() + " " + oa.token.AccessToken, |
| 137 | }, nil |
| 138 | } |
| 139 | |
| 140 | func (oa oauthAccess) RequireTransportSecurity() bool { |
| 141 | return true |
nothing calls this directly
no test coverage detected