Cuemon .NET Framework
Authenticate<T> Method

The type of the credentials returned from authorizationParser and passed to principalParser.
The context of the ASP.NET application.
When true, the HTTP connection is required to use secure sockets (that is, HTTPS); when false no requirement is enforced.
The function delegate that will parse the authorization header of a web request and return the credentials of T.
The function delegate that will parse the credentials of T returned from authorizationParser and if successful returns a System.Security.Principal.IPrincipal object.
Provides a generic way to make authentication requests using the specified context.
Syntax
'Declaration
 
Public Shared Sub Authenticate(Of T)( _
   ByVal context As HttpApplication, _
   ByVal requireSecureConnection As Boolean, _
   ByVal authorizationParser As Cuemon.Doer(Of String,T), _
   ByVal principalParser As Cuemon.TesterDoer(Of HttpApplication,T,IPrincipal,Boolean) _
) 
public static void Authenticate<T>( 
   HttpApplication context,
   bool requireSecureConnection,
   Cuemon.Doer<string,T> authorizationParser,
   Cuemon.TesterDoer<HttpApplication,T,IPrincipal,bool> principalParser
)

Parameters

context
The context of the ASP.NET application.
requireSecureConnection
When true, the HTTP connection is required to use secure sockets (that is, HTTPS); when false no requirement is enforced.
authorizationParser
The function delegate that will parse the authorization header of a web request and return the credentials of T.
principalParser
The function delegate that will parse the credentials of T returned from authorizationParser and if successful returns a System.Security.Principal.IPrincipal object.

Type Parameters

T
The type of the credentials returned from authorizationParser and passed to principalParser.
Exceptions
ExceptionDescription
System.Security.SecurityException Authorized failed for the request.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AuthenticationUtility Class
AuthenticationUtility Members

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback