Share via


AuthenticationHandler.InvokeAsync Method

Called once by common code after initialization. If an authentication middleware responds directly to specifically known paths it must override this virtual, compare the request path to it's known paths, provide any response information as appropriate, and true to stop further processing.

Namespace:  Microsoft.Owin.Security.Infrastructure
Assembly:  Microsoft.Owin.Security (in Microsoft.Owin.Security.dll)

Syntax

'Declaration
Public Overridable Function InvokeAsync As Task(Of Boolean)
'Usage
Dim instance As AuthenticationHandler 
Dim returnValue As Task(Of Boolean)

returnValue = instance.InvokeAsync()
public virtual Task<bool> InvokeAsync()
public:
virtual Task<bool>^ InvokeAsync()
abstract InvokeAsync : unit -> Task<bool> 
override InvokeAsync : unit -> Task<bool> 
public function InvokeAsync() : Task<boolean>

Return Value

Type: System.Threading.Tasks.Task<Boolean>
Returning false will cause the common code to call the next middleware in line. Returning true will cause the common code to begin the async completion journey without calling the rest of the middleware pipeline.

See Also

Reference

AuthenticationHandler Class

Microsoft.Owin.Security.Infrastructure Namespace