DataProtectorTokenProvider<TUser, TKey> Class
Represents a token provider that uses an IDataProtector to generate encrypted tokens based off of the security stamp.
Namespace: Microsoft.AspNet.Identity.Owin
Assembly: Microsoft.AspNet.Identity.Owin (in Microsoft.AspNet.Identity.Owin.dll)
Inheritance Hierarchy
System.Object
Microsoft.AspNet.Identity.Owin.DataProtectorTokenProvider<TUser, TKey>
Microsoft.AspNet.Identity.Owin.DataProtectorTokenProvider<TUser>
Syntax
public class DataProtectorTokenProvider<TUser, TKey> : IUserTokenProvider<TUser, TKey>
where TUser : class, IUser<TKey>
where TKey : object, IEquatable<TKey>
generic<typename TUser, typename TKey>
where TUser : ref class, IUser<TKey>
where TKey : Object, IEquatable<TKey>
public ref class DataProtectorTokenProvider : IUserTokenProvider<TUser, TKey>
type DataProtectorTokenProvider<'TUser, 'TKey when 'TUser : not struct and IUser<'TKey> when 'TKey : Object and IEquatable<'TKey>> =
class
interface IUserTokenProvider<'TUser, 'TKey>
end
Public Class DataProtectorTokenProvider(Of TUser As { Class, IUser(Of TKey) }, TKey As { Object, IEquatable(Of TKey) })
Implements IUserTokenProvider(Of TUser, TKey)
Type Parameters
- TUser
The type of the user.
- TKey
The type of the key.
Constructors
Name | Description | |
---|---|---|
DataProtectorTokenProvider<TUser, TKey>(IDataProtector) | Initializes a new instance of the DataProtectorTokenProvider<TUser, TKey> class. |
Properties
Name | Description | |
---|---|---|
Protector | Gets the IDataProtector for the token. |
|
TokenLifespan | Gets or sets the lifespan after which the token is considered expired. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
GenerateAsync(String, UserManager<TUser, TKey>, TUser) | Asynchronously generates a protected string for a user. |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
IsValidProviderForUserAsync(UserManager<TUser, TKey>, TUser) | Asynchronously determines whether the provider can be used to generate tokens for this user. |
|
MemberwiseClone() | (Inherited from Object.) |
|
NotifyAsync(String, UserManager<TUser, TKey>, TUser) | Asynchronously notifies a user. |
|
ToString() | (Inherited from Object.) |
|
ValidateAsync(String, String, UserManager<TUser, TKey>, TUser) | Asynchronously validates the token. |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Microsoft.AspNet.Identity.Owin Namespace
ASP.NET Identity
Return to top