Gemstone Security Library
Show/Hide TOC

# WindowsAuthenticationProviderExtensionsAddWindowsAuthenticationProvider(IServiceCollection, WindowsAuthenticationProviderOptions) Method

Adds the windows authentication provider as a singleton service using the default identity and given options.

## Definition

Namespace: Gemstone.Security.AuthenticationProviders
Assembly: Gemstone.Security (in Gemstone.Security.dll) Version: 1.0.156 -- Release Build+4c3328ef2f2dd1ee21cfac62d79c5988f91f59e3
C#
View Source Request Example

    public static IServiceCollection AddWindowsAuthenticationProvider(
    	this IServiceCollection services,
    	WindowsAuthenticationProviderOptions options
    )

VB
View Source Request Example

    <ExtensionAttribute>
    Public Shared Function AddWindowsAuthenticationProvider (
    	services As IServiceCollection,
    	options As WindowsAuthenticationProviderOptions
    ) As IServiceCollection

C++
View Source Request Example

    public:
    [ExtensionAttribute]
    static IServiceCollection^ AddWindowsAuthenticationProvider(
    	IServiceCollection^ services,
    	WindowsAuthenticationProviderOptions^ options
    )

JavaScript
View Source Request Example

    Gemstone.Security.AuthenticationProviders.WindowsAuthenticationProviderExtensions.AddWindowsAuthenticationProvider = function(services, options);

#### Parameters

services IServiceCollection
  The collection of services
options WindowsAuthenticationProviderOptions
  The options used to configure the authentication provider

#### Return Value

IServiceCollection
The collection of services.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IServiceCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

## See Also

#### Reference

WindowsAuthenticationProviderExtensions Class
AddWindowsAuthenticationProvider Overload
Gemstone.Security.AuthenticationProviders Namespace