Show / Hide Table of Contents

Class IServiceCollectionExtensions

Extensions for the IServiceCollection interface.

Inheritance
object
IServiceCollectionExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.SQTech.Authentication.PublicClientApp
Assembly: Microsoft.XboxStudios.SQTech.Authentication.PublicClientApp.dll
Syntax
public static class IServiceCollectionExtensions

Methods

View Source

AddMicrosoftPublicClientAppAuth(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.

View Source

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.

View Source

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

The PublicClientApplicationOptions.

Returns
Type Description
IServiceCollection

The configured services.

View Source

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.

View Source

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

The PublicClientApplicationOptions.

Returns
Type Description
IServiceCollection

The configured services.

Type Parameters
Name Description
TConfigurator

The IPublicClientApplication used to add additional configurations to the public client.

View Source

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.

  • View Source
In This Article
Back to top Generated by DocFX