src/AspNetCore/Identity/Bearer/src/SignInManaging/BearerSignInManager{UserType,BearerTokenType}.cs
/// <summary>
/// The refresh token does contain user security stamp and refresh token id.
/// </summary>
The refresh token does contain user security stamp and refresh token id.
The refresh token does contain user security stamp and refresh token id .
protected virtual async Task<(BearerTokenType RefreshTokenEntity, string RefreshToken)> GenerateAndStoreRefreshTokenEntityAsync(UserType user)
        {
            user = user ?? throw new ArgumentNullException(nameof(user));
            var refreshTokenDescriptor = signInManagerOptions.CreateRefreshTokenDescriptor();
            var issuedAtUtc = refreshTokenDescriptor.IssuedAt == null ? DateTime.UtcNow :
                DateTime.SpecifyKind((DateTime)refreshTokenDescriptor.IssuedAt, DateTimeKind.Utc);
            var expiresAtUtc = refreshTokenDescriptor.Expires ?? throw new ArgumentNullException(nameof(refreshTokenDescriptor.Expires));
            var refreshTokenEntity = CreateRefreshToken(user.Id, issuedAtUtc, expiresAtUtc);
            await StoreRefreshTokenEntityAsync(refreshTokenEntity);
            refreshTokenDescriptor.Claims.Add(identityOptions.Value.ClaimsIdentity.SecurityStampClaimType, user.SecurityStamp);
            refreshTokenDescriptor.Claims.Add(BearerSignInManagerDefaults.BearerSignInManagerRefreshTokenIdClaimType, refreshTokenEntity.BearerTokenId);
            var refreshToken = BearerSignInManagerUtils.GenerateJwtToken(refreshTokenDescriptor, signInManagerOptions.SetDefaultTimesOnTokenCreation);
            return (RefreshTokenEntity: refreshTokenEntity, RefreshToken: refreshToken);
        }
protected virtual async Task < ( BearerTokenType RefreshTokenEntity , string RefreshToken ) > GenerateAndStoreRefreshTokenEntityAsync ( UserType user ) { user = user ?? throw new ArgumentNullException ( nameof ( user ) ) ; var refreshTokenDescriptor = signInManagerOptions . CreateRefreshTokenDescriptor ( ) ; var issuedAtUtc = refreshTokenDescriptor . IssuedAt == null ? DateTime . UtcNow : DateTime . SpecifyKind ( ( DateTime ) refreshTokenDescriptor . IssuedAt , DateTimeKind . Utc ) ; var expiresAtUtc = refreshTokenDescriptor . Expires ?? throw new ArgumentNullException ( nameof ( refreshTokenDescriptor . Expires ) ) ; var refreshTokenEntity = CreateRefreshToken ( user . Id , issuedAtUtc , expiresAtUtc ) ; await StoreRefreshTokenEntityAsync ( refreshTokenEntity ) ; refreshTokenDescriptor . Claims . Add ( identityOptions . Value . ClaimsIdentity . SecurityStampClaimType , user . SecurityStamp ) ; refreshTokenDescriptor . Claims . Add ( BearerSignInManagerDefaults . BearerSignInManagerRefreshTokenIdClaimType , refreshTokenEntity . BearerTokenId ) ; var refreshToken = BearerSignInManagerUtils . GenerateJwtToken ( refreshTokenDescriptor , signInManagerOptions . SetDefaultTimesOnTokenCreation ) ; return ( RefreshTokenEntity : refreshTokenEntity , RefreshToken : refreshToken ) ; }
The refresh token does contain user security stamp and refresh token id.
The refresh token does contain user security stamp and refresh token id .
user
UserType