(r *http.Request)
| 2138 | } |
| 2139 | |
| 2140 | func readAndRestoreRequestBody(r *http.Request) ([]byte, error) { |
| 2141 | if r == nil || r.Body == nil { |
| 2142 | return nil, nil |
| 2143 | } |
| 2144 | body, errReadAll := io.ReadAll(r.Body) |
| 2145 | if errReadAll != nil { |
| 2146 | r.Body = io.NopCloser(bytes.NewReader(body)) |
| 2147 | return nil, errReadAll |
| 2148 | } |
| 2149 | r.Body = io.NopCloser(bytes.NewReader(body)) |
| 2150 | return body, nil |
| 2151 | } |
| 2152 | |
| 2153 | func authID(auth *coreauth.Auth) string { |
| 2154 | if auth == nil { |
no outgoing calls
no test coverage detected