Class IServiceCollectionExtensions
Extensions for the IServiceCollection interface.
Inherited Members
Namespace: Microsoft.XboxStudios.SQTech.Authentication.PublicClientApp
Assembly: Microsoft.XboxStudios.SQTech.Authentication.PublicClientApp.dll
Syntax
public static class IServiceCollectionExtensions
Methods
View SourceAddMicrosoftPublicClientAppAuth(IServiceCollection, string)
Adds a public client application under the Microsoft tenant ID to use for authorization code flow.
Declaration
public static IServiceCollection AddMicrosoftPublicClientAppAuth(this IServiceCollection services, string clientId)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The services to configure. |
| string | clientId | The client ID of the application. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The configured services. |
AddMicrosoftPublicClientAppAuth<TConfigurator>(IServiceCollection, string)
Adds a public client application under the Microsoft tenant ID to use for authorization code flow.
Declaration
public static IServiceCollection AddMicrosoftPublicClientAppAuth<TConfigurator>(this IServiceCollection services, string clientId) where TConfigurator : class, IPublicClientApplicationConfigurator
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The services to configure. |
| string | clientId | The client ID of the application. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The configured services. |
Type Parameters
| Name | Description |
|---|---|
| TConfigurator | The IPublicClientApplication used to add additional configurations to the public client. |
AddPublicClientAppAuth(IServiceCollection, Action<PublicClientApplicationOptions>)
Adds a public client application to use for authorization code flow.
Declaration
public static IServiceCollection AddPublicClientAppAuth(this IServiceCollection services, Action<PublicClientApplicationOptions> options)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The services to configure. |
| Action<PublicClientApplicationOptions> | options |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The configured services. |
AddPublicClientAppAuth(IServiceCollection, string, string)
Adds a public client application to use for authorization code flow.
Declaration
public static IServiceCollection AddPublicClientAppAuth(this IServiceCollection services, string clientId, string tenantId)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The services to configure. |
| string | clientId | The client ID of the application. |
| string | tenantId | The tenant ID the client is registered under. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The configured services. |
AddPublicClientAppAuth<TConfigurator>(IServiceCollection, Action<PublicClientApplicationOptions>)
Adds a public client application to use for authorization code flow.
Declaration
public static IServiceCollection AddPublicClientAppAuth<TConfigurator>(this IServiceCollection services, Action<PublicClientApplicationOptions> options) where TConfigurator : class, IPublicClientApplicationConfigurator
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The services to configure. |
| Action<PublicClientApplicationOptions> | options |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The configured services. |
Type Parameters
| Name | Description |
|---|---|
| TConfigurator | The IPublicClientApplication used to add additional configurations to the public client. |
AddPublicClientAppAuth<TConfigurator>(IServiceCollection, string, string)
Adds a public client application to use for authorization code flow.
Declaration
public static IServiceCollection AddPublicClientAppAuth<TConfigurator>(this IServiceCollection services, string clientId, string tenantId) where TConfigurator : class, IPublicClientApplicationConfigurator
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The services to configure. |
| string | clientId | The client ID of the application. |
| string | tenantId | The tenant ID the client is registered under. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The configured services. |
Type Parameters
| Name | Description |
|---|---|
| TConfigurator | The IPublicClientApplication used to add additional configurations to the public client. |