Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion GraphClientFactory.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@ There are two primary usage scenarios for the client factory. Developers who wi
- Set the SdkVersion header with the appropriate moniker based on the following structure `graph-{lang}-{version}`.
- Enable the developer to select a supported sovereign cloud using an enumerated list. Selecting the sovereign cloud should ensure that the AuthenticationProvider uses the appropriate Authentication Endpoint.
- Enable a developer to configure a HTTP proxy that will be used for outgoing requests.

- Enable a developer to provide custom hosts.
- `CustomHosts` option should be set on client creation.
- `CustomHosts` option should be made available in the `Context` so that it is available to the middleware during request processing.
- These hostnames are different from the Graph service endpoints on the national clouds.
- Certain workloads error out when an unexpected header is present in the request. The middlewares should check:
- If the request URL is a Graph service endpoint or a custom host provided by the developer, then append request headers or modify the request content.
- Else the middleware should delete request headers added by that middleware.
- Example of an workload error - [LargeFileUploadTask upload to OneDrive caused CORS error due `SDKVersion` telemetry header](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues/265)
- Provide capabilities to modify or update the `CustomHosts` option after the client creation.

## Performance Considerations

- If available on the platform, enable gzip compression of requests and responses.

## Future Implementation

- Enable developers to set `CustomHosts`. The progress can be tracked as follows:
```
| SDK | Implementation Status|
|-------------|----------------------|
| C# | - |
| JAVA | - |
| PHP | - |
| JavaScript | In Progress |
```
## Security Considerations

- If available on the platform, configure for TLS 1.2
Expand Down
4 changes: 4 additions & 0 deletions middleware/AuthorizationHandler.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ A piece of client-side middleware intended to allow the use of an authorization
- Transparently authorize requests
- Accept AuthorizationProvider instance in constructor
- Update Authorization Header
- Certain workloads error out when an unexpected header is present in the request. The middlewares should check:
- If the request URL is a Graph serve endpoint or a custom url provided by the developer, then append or update the authorization header.
- Else the middleware should delete authorization header.


Take a request object and use authorization provider to add Authorization header.

Expand Down
4 changes: 4 additions & 0 deletions middleware/TelemetryHandler.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ Provide a mandatory middleware component that attaches metadata to a Graph reque
- `RuntimeEnvironment: Node/1.1` for JavaScript.
- `RuntimeEnvironment: JRE/1.1` for Java.

- Certain workloads error out when an unexpected header is present in the request. The middlewares should check:
- If the request URL is a Graph serve endpoint or a custom url provided by the developer, then append or update the telemetry headers.
- Else the middleware should delete telemetry header.

#### Ideal Metadata Capture
```
SdkVersion: graph-dotnet-beta/0.6.0-preview, graph-dotnet-core/1.16.0 (featureUsage=0f)
Expand Down