RegisteredModules Property
Collapse the table of content
Expand the table of content

AuthenticationManager::RegisteredModules Property

 

Gets a list of authentication modules that are registered with the authentication manager.

Namespace:   System.Net
Assembly:  System (in System.dll)

public:
property IEnumerator^ RegisteredModules {
	static IEnumerator^ get();
}

Property Value

Type: System.Collections::IEnumerator^

An IEnumerator that enables the registered authentication modules to be read.

The RegisteredModules property provides an IEnumerator instance that enables the list of registered authentication modules to be read. The Register method adds modules to the list, and the Unregister method removes modules from it.

The following example uses the RegisteredModules property to get a list of authentication modules that are registered with the authentication manager. For a complete example, refer to the AuthenticationManager class.

// Display registered authentication modules.
static void displayRegisteredModules()
{

   // The AuthenticationManager calls all authentication modules sequentially
   // until one of them responds with an authorization instance.  Show
   // the current registered modules, for testing purposes.
   IEnumerator^ registeredModules = AuthenticationManager::RegisteredModules;
   Console::WriteLine( "\r\nThe following authentication modules are now registered with the system" );
   while ( registeredModules->MoveNext() )
   {
      Console::WriteLine( "\r \n Module : {0}", registeredModules->Current );
      IAuthenticationModule^ currentAuthenticationModule = dynamic_cast<IAuthenticationModule^>(registeredModules->Current);
      Console::WriteLine( "\t  CanPreAuthenticate : {0}", currentAuthenticationModule->CanPreAuthenticate );
   }
}


.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft