Class GraphAuthClientFactory
The HTTP graph client factory.
Implements
Namespace: Microsoft.Graph.Communications.Client.Transport
Assembly: Microsoft.Graph.Communications.Client.dll
Syntax
public class GraphAuthClientFactory : ObjectRoot, IGraphClientFactory
Constructors
GraphAuthClientFactory(IGraphLogger, JsonSerializerSettings, IRequestAuthenticationProvider, ProductInfoHeaderValue, IEnumerable<IGraphProperty>, HttpClient)
Initializes a new instance of the GraphAuthClientFactory class.
Declaration
public GraphAuthClientFactory(IGraphLogger logger, JsonSerializerSettings jsonSerializerSettings, IRequestAuthenticationProvider authenticationProvider, ProductInfoHeaderValue userAgent, IEnumerable<IGraphProperty> defaultProperties, HttpClient httpClient = null)
Parameters
Type | Name | Description |
---|---|---|
IGraphLogger | logger | Logger instance. |
Newtonsoft.Json.JsonSerializerSettings | jsonSerializerSettings | The json serializer settings. |
IRequestAuthenticationProvider | authenticationProvider | The authentication provider. |
ProductInfoHeaderValue | userAgent | The user agent. |
IEnumerable<IGraphProperty> | defaultProperties | The default properties. |
HttpClient | httpClient | The HTTP client. |
Properties
AuthenticationProvider
Gets the authentication provider.
Declaration
public IRequestAuthenticationProvider AuthenticationProvider { get; }
Property Value
Type | Description |
---|---|
IRequestAuthenticationProvider | The authentication provider. |
GraphLogger
Gets the graph logger.
Declaration
public IGraphLogger GraphLogger { get; }
Property Value
Type | Description |
---|---|
IGraphLogger |
Methods
Create(IGraphLogger)
Creates a new IGraphClient.
Declaration
public IGraphClient Create(IGraphLogger logger = null)
Parameters
Type | Name | Description |
---|---|---|
IGraphLogger | logger | An optional IGraphLogger logger to be used in the new IGraphClient. |
Returns
Type | Description |
---|---|
IGraphClient | The IGraphClient. |