Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CookieAuthenticationOptions Class

 

Contains the options used by the CookiesAuthenticationMiddleware.

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

System::Object
  Microsoft.Owin.Security::AuthenticationOptions
    Microsoft.Owin.Security.Cookies::CookieAuthenticationOptions

public ref class CookieAuthenticationOptions : AuthenticationOptions

NameDescription
System_CAPS_pubmethodCookieAuthenticationOptions()

Create an instance of the options initialized with the default values.

NameDescription
System_CAPS_pubpropertyAuthenticationMode

If Active the authentication middleware alter the request user coming in and alter 401 Unauthorized responses going out. If Passive the authentication middleware will only provide identity and alter responses when explicitly indicated by the AuthenticationType.(Inherited from AuthenticationOptions.)

System_CAPS_pubpropertyAuthenticationType

The AuthenticationType in the options corresponds to the IIdentity AuthenticationType property. A different value may be assigned in order to use the same authentication middleware type more than once in a pipeline.(Inherited from AuthenticationOptions.)

System_CAPS_pubpropertyCookieDomain

Determines the domain used to create the cookie. Is not provided by default.

System_CAPS_pubpropertyCookieHttpOnly

Determines if the browser should allow the cookie to be accessed by client-side javascript. The default is true, which means the cookie will only be passed to http requests and is not made available to script on the page.

System_CAPS_pubpropertyCookieManager

The component used to get cookies from the request or set them on the response. ChunkingCookieManager will be used by default.

System_CAPS_pubpropertyCookieName

Determines the cookie name used to persist the identity. The default value is ".AspNet.Cookies". This value should be changed if you change the name of the AuthenticationType, especially if your system uses the cookie authentication middleware multiple times.

System_CAPS_pubpropertyCookiePath

Determines the path used to create the cookie. The default value is "/" for highest browser compatability.

System_CAPS_pubpropertyCookieSecure

Determines if the cookie should only be transmitted on HTTPS request. The default is to limit the cookie to HTTPS requests if the page which is doing the SignIn is also HTTPS. If you have an HTTPS sign in page and portions of your site are HTTP you may need to change this value.

System_CAPS_pubpropertyDescription

Additional information about the authentication type which is made available to the application.(Inherited from AuthenticationOptions.)

System_CAPS_pubpropertyExpireTimeSpan

Controls how much time the cookie will remain valid from the point it is created. The expiration information is in the protected cookie ticket. Because of that an expired cookie will be ignored even if it is passed to the server after the browser should have purged it.

System_CAPS_pubpropertyLoginPath

The LoginPath property informs the middleware that it should change an outgoing 401 Unauthorized status code into a 302 redirection onto the given login path. The current url which generated the 401 is added to the LoginPath as a query string parameter named by the ReturnUrlParameter. Once a request to the LoginPath grants a new SignIn identity, the ReturnUrlParameter value is used to redirect the browser back to the url which caused the original unauthorized status code. If the LoginPath is null or empty, the middleware will not look for 401 Unauthorized status codes, and it will not redirect automatically when a login occurs.

System_CAPS_pubpropertyLogoutPath

If the LogoutPath is provided the middleware then a request to that path will redirect based on the ReturnUrlParameter.

System_CAPS_pubpropertyProvider

The Provider may be assigned to an instance of an object created by the application at startup time. The middleware calls methods on the provider which give the application control at certain points where processing is occuring. If it is not provided a default instance is supplied which does nothing when the methods are called.

System_CAPS_pubpropertyReturnUrlParameter

The ReturnUrlParameter determines the name of the query string parameter which is appended by the middleware when a 401 Unauthorized status code is changed to a 302 redirect onto the login path. This is also the query string parameter looked for when a request arrives on the login path or logout path, in order to return to the original url after the action is performed.

System_CAPS_pubpropertySessionStore

An optional container in which to store the identity across requests. When used, only a session identifier is sent to the client. This can be used to mitigate potential problems with very large identities.

System_CAPS_pubpropertySlidingExpiration

The SlidingExpiration is set to true to instruct the middleware to re-issue a new cookie with a new expiration time any time it processes a request which is more than halfway through the expiration window.

System_CAPS_pubpropertySystemClock

The SystemClock provides access to the system's current time coordinates. If it is not provided a default instance is used which calls DateTimeOffset.UtcNow. This is typically not replaced except for unit testing.

System_CAPS_pubpropertyTicketDataFormat

The TicketDataFormat is used to protect and unprotect the identity and other properties which are stored in the cookie value. If it is not provided a default data handler is created using the data protection service contained in the IAppBuilder.Properties. The default data protection service is based on machine key when running on ASP.NET, and on DPAPI when running in a different process.

NameDescription
System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: