IAuthenticationManager.Challenge Method

 

Creates a challenge for the authentication manager.

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

Overload List

Name Description
System_CAPS_pubmethod Challenge(AuthenticationProperties, String[])

Add information into the response environment that will cause the authentication middleware to challenge the caller to authenticate. This also changes the status code of the response to 401. The nature of that challenge varies greatly, and ranges from adding a response header or changing the 401 status code to a 302 redirect.

System_CAPS_pubmethod Challenge(String[])

Add information into the response environment that will cause the authentication middleware to challenge the caller to authenticate. This also changes the status code of the response to 401. The nature of that challenge varies greatly, and ranges from adding a response header or changing the 401 status code to a 302 redirect.

See Also

IAuthenticationManager Interface
Microsoft.Owin.Security Namespace

Return to top

IAuthenticationManager.Challenge Method (AuthenticationProperties, String[])

Add information into the response environment that will cause the authentication middleware to challenge the caller to authenticate. This also changes the status code of the response to 401. The nature of that challenge varies greatly, and ranges from adding a response header or changing the 401 status code to a 302 redirect.

Syntax

void Challenge(
    AuthenticationProperties properties,
    params string[] authenticationTypes
)
void Challenge(
    AuthenticationProperties^ properties,
    ... array<String^>^ authenticationTypes
)
abstract Challenge : 
        properties:AuthenticationProperties *
        [<ParamArrayAttribute>] authenticationTypes:string[] -> unit
Sub Challenge (
    properties As AuthenticationProperties,
    ParamArray authenticationTypes As String()
)

Parameters

  • authenticationTypes
    Type: System.String[]

    Identify which middleware should perform their alterations on the response. If the authenticationTypes is null or empty, that means the AuthenticationMode.Active middleware should perform their alterations on the response.

Return to top

IAuthenticationManager.Challenge Method (String[])

Add information into the response environment that will cause the authentication middleware to challenge the caller to authenticate. This also changes the status code of the response to 401. The nature of that challenge varies greatly, and ranges from adding a response header or changing the 401 status code to a 302 redirect.

Syntax

void Challenge(
    params string[] authenticationTypes
)
void Challenge(
    ... array<String^>^ authenticationTypes
)
abstract Challenge : 
        [<ParamArrayAttribute>] authenticationTypes:string[] -> unit
Sub Challenge (
    ParamArray authenticationTypes As String()
)

Parameters

  • authenticationTypes
    Type: System.String[]

    Identify which middleware should perform their alterations on the response. If the authenticationTypes is null or empty, that means the AuthenticationMode.Active middleware should perform their alterations on the response.

Return to top