src/AspNetCore/Identity/Bearer/src/Stores/BearerTokenStore{DbContextType,BearerTokenType}.cs
/// <summary>
/// Deletes refresh token by identifier but skips when the bearer token identifier does not exist.
/// </summary>
/// <param name="refreshTokenId">The refresh token identifier.</param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Deletes refresh token by identifier but skips when the bearer token identifier does not exist.
Deletes refresh token by identifier but skips when the bearer token identifier does not exist .
public async Task<bool> TryDeleteAsync(Guid refreshTokenId, CancellationToken cancellationToken = default)
        {
            var entity = await FindAsync(refreshTokenId, cancellationToken);
            if (!ReferenceEquals(entity, null)) {
                dbContext.Remove(entity);
                return true;
            }
            return false;
        }
public async Task < bool > TryDeleteAsync ( Guid refreshTokenId , CancellationToken cancellationToken = default ) { var entity = await FindAsync ( refreshTokenId , cancellationToken ) ; if ( ! ReferenceEquals ( entity , null ) ) { dbContext . Remove ( entity ) ; return true ; } return false ; }
Deletes refresh token by identifier but skips when the bearer token identifier does not exist.
Deletes refresh token by identifier but skips when the bearer token identifier does not exist .
None
refreshTokenId
Guid
The refresh token identifier.
The refresh token identifier .
cancellationToken
CancellationToken
None