public void WhenCalled_SetsSingleUseTokenWithConnectionString() { var options = new TableIdentityOptions("ConnectionString"); Assert.NotNull(options.SingleUseToken); Assert.Equal("ConnectionString", options.SingleUseToken.StorageAccountConnectionString); }
public void WhenCalled_SetsTableStoreWithConnectionString() { var options = new TableIdentityOptions("ConnectionString"); Assert.NotNull(options.TableStore); Assert.Equal("ConnectionString", options.TableStore.StorageAccountConnectionString); }
public static IServiceCollection AddThoughtHavenIdentity <TUser>( this IServiceCollection services, TableIdentityOptions options) where TUser : class, IUserKey, IUserId, IUserEmail, IUserCreated, IUserSecurityStamp, IUserLastLogin, new() { Guard.Null(nameof(services), services); Guard.Null(nameof(options), options); services.TryAddSingleton(options); services.TryAddSingleton(options.TableStore); services.AddSingleUseTokens(options.SingleUseToken); return(services.AddThoughtHavenIdentity <TUser, TableUserEmailStore <TUser>, TableSingleUseTokenService, TableTimedLockoutStore>(options)); }