Dela via


UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>.HasPasswordAsync Method

Definition

Returns a flag indicating if the specified user has a password.

public virtual System.Threading.Tasks.Task<bool> HasPasswordAsync (TUser user, System.Threading.CancellationToken cancellationToken = default);
abstract member HasPasswordAsync : 'User * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.HasPasswordAsync : 'User * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function HasPasswordAsync (user As TUser, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

user
TUser

The user to retrieve the password hash for.

cancellationToken
CancellationToken

The CancellationToken used to propagate notifications that the operation should be canceled.

Returns

A Task<TResult> containing a flag indicating if the specified user has a password. If the user has a password the returned value with be true, otherwise it will be false.

Implements

Applies to