HttpContextExtensions Type

Static members

Static member Description

HttpContextExtensions.AsyncSignIn(this, name, ?persistFor, ?claims, ?properties, ?authenticationType)

Full Usage: HttpContextExtensions.AsyncSignIn(this, name, ?persistFor, ?claims, ?properties, ?authenticationType)

Parameters:
Returns: Async<unit>

Sign in a user with the given name.

this : HttpContext
name : string
?persistFor : TimeSpan
?claims : seq<Claim>
?properties : AuthenticationProperties
?authenticationType : string
Returns: Async<unit>

HttpContextExtensions.AsyncSignOut(this, ?properties)

Full Usage: HttpContextExtensions.AsyncSignOut(this, ?properties)

Parameters:
Returns: Async<unit>

Sign out a user.

this : HttpContext
?properties : AuthenticationProperties
Returns: Async<unit>

HttpContextExtensions.TryIdentity(this)

Full Usage: HttpContextExtensions.TryIdentity(this)

Parameters:
Returns: IIdentity option

Get the logged in user's identity, or None if they are not logged in.

this : HttpContext
Returns: IIdentity option

HttpContextExtensions.TryUsername(this)

Full Usage: HttpContextExtensions.TryUsername(this)

Parameters:
Returns: string option

Get the logged in user's name, or None if they are not logged in.

this : HttpContext
Returns: string option