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.​AspNetCore.​Authentication.​AuthenticationProperties
Assembly: Microsoft.AspNetCore.Authentication.Abstractions
Inheritance: object → AuthenticationProperties
Dictionary used to store state values about the authentication session.
Properties
public
System.​Collections.​Generic.​IDictionary<​string, string>
Items
State values about the authentication session.
public
System.​Collections.​Generic.​IDictionary<​string, object>
Parameters
Collection of parameters that are passed to the authentication handler. These are not intended for
serialization or persistence, only for flowing data between call sites.
public
bool
IsPersistent
Gets or sets whether the authentication session is persisted across multiple requests.
public
string
RedirectUri
Gets or sets the full path or absolute URI to be used as an http redirect response value.
IssuedUtc
Gets or sets the time at which the authentication ticket was issued.
ExpiresUtc
Gets or sets the time at which the authentication ticket expires.
public
bool?
AllowRefresh
Gets or sets if refreshing the authentication session should be allowed.
Methods
Returns A copy.
public
string
GetString​(string key)
Get a string value from the <see cref="P:Microsoft.AspNetCore.Authentication.AuthenticationProperties.Items" /> collection.
Returns Retrieved value or <c>null</c> if the property is not set.
key
Property key.
public
void
SetString​(string key,
string value)
Set or remove a string value from the <see cref="P:Microsoft.AspNetCore.Authentication.AuthenticationProperties.Items" /> collection.
key
Property key.
value
Value to set or <see langword="null" /> to remove the property.
public
T
GetParameter​(string key)
Get a parameter from the <see cref="P:Microsoft.AspNetCore.Authentication.AuthenticationProperties.Parameters" /> collection.
Returns Retrieved value or the default value if the property is not set.
key
Parameter key.
public
void
SetParameter​(string key,
T value)
Set a parameter value in the <see cref="P:Microsoft.AspNetCore.Authentication.AuthenticationProperties.Parameters" /> collection.
key
Parameter key.
value
Value to set.
protected
bool?
GetBool​(string key)
Get a nullable <see cref="T:System.Boolean" /> from the <see cref="P:Microsoft.AspNetCore.Authentication.AuthenticationProperties.Items" /> collection.
Returns Retrieved value or <see langword="null" /> if the property is not set.
key
Property key.
protected
void
SetBool​(string key,
bool? value)
Set or remove a <see cref="T:System.Boolean" /> value in the <see cref="P:Microsoft.AspNetCore.Authentication.AuthenticationProperties.Items" /> collection.
key
Property key.
value
Value to set or <see langword="null" /> to remove the property.
protected
System.​DateTimeOffset?
GetDateTimeOffset​(string key)
Get a nullable <see cref="T:System.DateTimeOffset" /> value from the <see cref="P:Microsoft.AspNetCore.Authentication.AuthenticationProperties.Items" /> collection.
Returns Retrieved value or <see langword="null" /> if the property is not set.
key
Property key.
protected
void
SetDateTimeOffset​(string key,
System.​DateTimeOffset? value)
Sets or removes a <see cref="T:System.DateTimeOffset" /> value in the <see cref="P:Microsoft.AspNetCore.Authentication.AuthenticationProperties.Items" /> collection.
key
Property key.
value
Value to set or <see langword="null" /> to remove the property.
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