Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Microsoft.​Extensions.​DependencyInjection.​CookieExtensions
Assembly: Microsoft.AspNetCore.Authentication.Cookies
Inheritance: object → CookieExtensions
Extension methods to configure cookie authentication.
Methods
AddCookie​(AspNetCore.​Authentication.​AuthenticationBuilder builder)
Adds cookie authentication to <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationBuilder" /> using the default scheme.
The default scheme is specified by <see cref="F:Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults.AuthenticationScheme" /> .
<para>
Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.
</para>
Returns A reference to <paramref name="builder" /> after the operation has completed.
builder
The <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationBuilder" /> .
AddCookie​(AspNetCore.​Authentication.​AuthenticationBuilder builder,
string authenticationScheme)
Adds cookie authentication to <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationBuilder" /> using the specified scheme.
<para>
Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.
</para>
Returns A reference to <paramref name="builder" /> after the operation has completed.
builder
The <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationBuilder" /> .
authenticationScheme
The authentication scheme.
AddCookie​(AspNetCore.​Authentication.​AuthenticationBuilder builder,
System.​Action<​AspNetCore.​Authentication.​Cookies.​CookieAuthenticationOptions> configureOptions)
Adds cookie authentication to <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationBuilder" /> using the default scheme.
The default scheme is specified by <see cref="F:Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationDefaults.AuthenticationScheme" /> .
<para>
Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.
</para>
Returns A reference to <paramref name="builder" /> after the operation has completed.
builder
The <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationBuilder" /> .
configureOptions
A delegate to configure <see cref="T:Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions" /> .
AddCookie​(AspNetCore.​Authentication.​AuthenticationBuilder builder,
string authenticationScheme,
System.​Action<​AspNetCore.​Authentication.​Cookies.​CookieAuthenticationOptions> configureOptions)
Adds cookie authentication to <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationBuilder" /> using the specified scheme.
<para>
Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.
</para>
Returns A reference to <paramref name="builder" /> after the operation has completed.
builder
The <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationBuilder" /> .
authenticationScheme
The authentication scheme.
configureOptions
A delegate to configure <see cref="T:Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions" /> .
AddCookie​(AspNetCore.​Authentication.​AuthenticationBuilder builder,
string authenticationScheme,
string displayName,
System.​Action<​AspNetCore.​Authentication.​Cookies.​CookieAuthenticationOptions> configureOptions)
Adds cookie authentication to <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationBuilder" /> using the specified scheme.
<para>
Cookie authentication uses a HTTP cookie persisted in the client to perform authentication.
</para>
Returns A reference to <paramref name="builder" /> after the operation has completed.
builder
The <see cref="T:Microsoft.AspNetCore.Authentication.AuthenticationBuilder" /> .
authenticationScheme
The authentication scheme.
displayName
A display name for the authentication handler.
configureOptions
A delegate to configure <see cref="T:Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions" /> .
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object