public PasswordRecoverySender(IKeychain keychain, AbstractLogger logger, string localStorageDirPath, string guestControllerHostUrl, string guestControllerSpoofedIpAddress, string oneIdClientId, ICoroutineManager coroutineManager) { SystemStopwatchFactory stopwatchFactory = new SystemStopwatchFactory(); SystemWwwFactory wwwFactory = new SystemWwwFactory(); WwwCallFactory wwwCallFactory = new WwwCallFactory(logger, coroutineManager, stopwatchFactory, wwwFactory); FileSystem fileSystem = new FileSystem(); DatabaseDirectoryCreator directoryCreator = new DatabaseDirectoryCreator(fileSystem, localStorageDirPath); DocumentCollectionFactory documentCollectionFactory = new DocumentCollectionFactory(); SystemRandom random = new SystemRandom(); DatabaseCorruptionHandler databaseCorruptionHandler = new DatabaseCorruptionHandler(logger, fileSystem, localStorageDirPath); SystemEpochTime epochTime = new SystemEpochTime(); Database database = new Database(keychain.LocalStorageKey, random, epochTime, directoryCreator, documentCollectionFactory, databaseCorruptionHandler); GuestControllerClient guestControllerClient = new GuestControllerClient(wwwCallFactory, guestControllerSpoofedIpAddress, database, "NoSWID", guestControllerHostUrl, oneIdClientId, logger); passwordRecoverySender = new Disney.Mix.SDK.Internal.PasswordRecoverySender(logger, guestControllerClient); }
public NewAccountValidator(IKeychain keychain, AbstractLogger logger, string localStorageDirPath, string guestControllerHostUrl, string guestControllerSpoofedIpAddress, string oneIdClientId, ICoroutineManager coroutineManager) { this.logger = logger; SystemStopwatchFactory stopwatchFactory = new SystemStopwatchFactory(); SystemWwwFactory wwwFactory = new SystemWwwFactory(); WwwCallFactory wwwCallFactory = new WwwCallFactory(logger, coroutineManager, stopwatchFactory, wwwFactory); FileSystem fileSystem = new FileSystem(); DatabaseDirectoryCreator directoryCreator = new DatabaseDirectoryCreator(fileSystem, localStorageDirPath); DocumentCollectionFactory documentCollectionFactory = new DocumentCollectionFactory(); SystemRandom random = new SystemRandom(); DatabaseCorruptionHandler databaseCorruptionHandler = new DatabaseCorruptionHandler(logger, fileSystem, localStorageDirPath); SystemEpochTime epochTime = new SystemEpochTime(); Database database = new Database(keychain.LocalStorageKey, random, epochTime, directoryCreator, documentCollectionFactory, databaseCorruptionHandler); guestControllerClient = new GuestControllerClient(wwwCallFactory, guestControllerSpoofedIpAddress, database, string.Empty, guestControllerHostUrl, oneIdClientId, logger); }
public GeolocationGetter(AbstractLogger logger, ICoroutineManager coroutineManager, string mixApiHostUrl, string mixClientToken, string localStorageDirPath, IKeychain keychain) { SystemStopwatchFactory stopwatchFactory = new SystemStopwatchFactory(); SystemWwwFactory wwwFactory = new SystemWwwFactory(); WwwCallFactory wwwCallFactory = new WwwCallFactory(logger, coroutineManager, stopwatchFactory, wwwFactory); JsonWebCallEncryptor webCallEncryptor = new JsonWebCallEncryptor(); MixWebCallQueue webCallQueue = new MixWebCallQueue(); NoOpSessionRefresher sessionRefresher = new NoOpSessionRefresher(); FileSystem fileSystem = new FileSystem(); DatabaseDirectoryCreator databaseDirectoryCreator = new DatabaseDirectoryCreator(fileSystem, localStorageDirPath); string sdkDatabasesDirectory = databaseDirectoryCreator.GetSdkDatabasesDirectory(); DocumentCollectionFactory documentCollectionFactory = new DocumentCollectionFactory(); DatabaseCorruptionHandler databaseCorruptionHandler = new DatabaseCorruptionHandler(logger, fileSystem, sdkDatabasesDirectory); SystemRandom random = new SystemRandom(); SystemEpochTime epochTime = new SystemEpochTime(); Database database = new Database(keychain.LocalStorageKey, random, epochTime, databaseDirectoryCreator, documentCollectionFactory, databaseCorruptionHandler); MixWebCallFactory mixWebCallFactory = new MixWebCallFactory(logger, mixApiHostUrl, wwwCallFactory, webCallEncryptor, string.Empty, string.Empty, mixClientToken, webCallQueue, sessionRefresher, epochTime, database); geolocationGetter = new Disney.Mix.SDK.Internal.GeolocationGetter(logger, mixWebCallFactory); }
public RegistrationConfigurationGetter(IKeychain keychain, AbstractLogger logger, string localStorageDirPath, string guestControllerHostUrl, string guestControllerSpoofedIpAddress, string oneIdClientId, ICoroutineManager coroutineManager, string mixApiHostUrl, string mixClientToken) { SystemStopwatchFactory stopwatchFactory = new SystemStopwatchFactory(); SystemWwwFactory wwwFactory = new SystemWwwFactory(); WwwCallFactory wwwCallFactory = new WwwCallFactory(logger, coroutineManager, stopwatchFactory, wwwFactory); JsonWebCallEncryptor webCallEncryptor = new JsonWebCallEncryptor(); FileSystem fileSystem = new FileSystem(); DatabaseDirectoryCreator directoryCreator = new DatabaseDirectoryCreator(fileSystem, localStorageDirPath); DocumentCollectionFactory documentCollectionFactory = new DocumentCollectionFactory(); SystemRandom random = new SystemRandom(); DatabaseCorruptionHandler databaseCorruptionHandler = new DatabaseCorruptionHandler(logger, fileSystem, localStorageDirPath); SystemEpochTime epochTime = new SystemEpochTime(); Database database = new Database(keychain.LocalStorageKey, random, epochTime, directoryCreator, documentCollectionFactory, databaseCorruptionHandler); MixWebCallQueue webCallQueue = new MixWebCallQueue(); NoOpSessionRefresher sessionRefresher = new NoOpSessionRefresher(); MixWebCallFactory webCallFactory = new MixWebCallFactory(logger, mixApiHostUrl, wwwCallFactory, webCallEncryptor, string.Empty, string.Empty, mixClientToken, webCallQueue, sessionRefresher, epochTime, database); AgeBandBuilder ageBandBuilder = new AgeBandBuilder(logger, webCallFactory); GuestControllerClientFactory guestControllerClientFactory = new GuestControllerClientFactory(wwwCallFactory, guestControllerSpoofedIpAddress, database, guestControllerHostUrl, oneIdClientId, logger); registrationConfigurationGetter = new Disney.Mix.SDK.Internal.RegistrationConfigurationGetter(logger, guestControllerClientFactory, ageBandBuilder); }
public void Login(string guestControllerHostUrl, string guestControllerSpoofedIpAddress, string mixApiHostUrl, string oneIdClientId, string mixClientToken, string clientVersion, ICoroutineManager coroutineManager, IKeychain keychain, AbstractLogger logger, string localStorageDirPath, string loginValue, string password, string languageCode, Action <ILoginResult> callback) { CreateDependencies(guestControllerHostUrl, guestControllerSpoofedIpAddress, mixApiHostUrl, oneIdClientId, mixClientToken, clientVersion, coroutineManager, keychain, logger, localStorageDirPath, languageCode, out var sessionLogin, out var _, out var _, out var _, out var _); sessionLogin.Login(loginValue, password, callback); }
private static void CreateDependencies(string guestControllerHostUrl, string guestControllerSpoofedIpAddress, string mixApiHostUrl, string oneIdClientId, string mixClientToken, string clientVersion, ICoroutineManager coroutineManager, IKeychain keychain, AbstractLogger logger, string localStorageDirPath, string languageCode, out ISessionLogin sessionLogin, out ISessionRegister sessionRegister, out ISessionRestorer sessionRestorer, out ISessionReuser sessionReuser, out IOfflineSessionCreator offlineSessionCreator) { SystemStopwatchFactory systemStopwatchFactory = new SystemStopwatchFactory(); SystemWwwFactory wwwFactory = new SystemWwwFactory(); WwwCallFactory wwwCallFactory = new WwwCallFactory(logger, coroutineManager, systemStopwatchFactory, wwwFactory); FileSystem fileSystem = new FileSystem(); DatabaseDirectoryCreator databaseDirectoryCreator = new DatabaseDirectoryCreator(fileSystem, localStorageDirPath); DocumentCollectionFactory documentCollectionFactory = new DocumentCollectionFactory(); string sdkDatabasesDirectory = databaseDirectoryCreator.GetSdkDatabasesDirectory(); DatabaseCorruptionHandler databaseCorruptionHandler = new DatabaseCorruptionHandler(logger, fileSystem, sdkDatabasesDirectory); SystemRandom random = new SystemRandom(); SystemEpochTime epochTime = new SystemEpochTime(); Database database = new Database(keychain.LocalStorageKey, random, epochTime, databaseDirectoryCreator, documentCollectionFactory, databaseCorruptionHandler); MixWebCallQueue webCallQueue = new MixWebCallQueue(); MixSessionStartWebCallEncryptor sessionStartEncryptor = new MixSessionStartWebCallEncryptor(); MixWebCallFactoryFactory mixWebCallFactoryFactory = new MixWebCallFactoryFactory(logger, mixApiHostUrl, mixClientToken, wwwCallFactory, webCallQueue, epochTime, database); NotificationDispatcher notificationDispatcher = new NotificationDispatcher(); NotificationQueue notificationQueue = new NotificationQueue(notificationDispatcher); SessionStatus sessionStatus = new SessionStatus(isPaused: true); NoOpSessionRefresher sessionRefresher = new NoOpSessionRefresher(); JsonWebCallEncryptor webCallEncryptor = new JsonWebCallEncryptor(); IMixWebCallFactory webCallFactory = mixWebCallFactoryFactory.Create(webCallEncryptor, string.Empty, string.Empty, sessionRefresher); RsaEncryptor rsaEncryptor = new RsaEncryptor(); MixEncryptor encryptor = new MixEncryptor(); MixWebCallEncryptorFactory webCallEncryptorFactory = new MixWebCallEncryptorFactory(encryptor); SessionRefresherFactory sessionRefresherFactory = new SessionRefresherFactory(webCallQueue); MixSessionStarter mixSessionStarter = new MixSessionStarter(logger, rsaEncryptor, database, webCallEncryptorFactory, sessionStartEncryptor, mixWebCallFactoryFactory, keychain, coroutineManager, sessionRefresherFactory); IStopwatch pollCountdownStopwatch = systemStopwatchFactory.Create(); GuestControllerClientFactory guestControllerClientFactory = new GuestControllerClientFactory(wwwCallFactory, guestControllerSpoofedIpAddress, database, guestControllerHostUrl, oneIdClientId, logger); SessionFactory sessionFactory = new SessionFactory(logger, coroutineManager, pollCountdownStopwatch, epochTime, databaseCorruptionHandler, notificationQueue, notificationDispatcher, sessionStatus, mixWebCallFactoryFactory, webCallEncryptorFactory, mixSessionStarter, keychain, sessionRefresherFactory, guestControllerClientFactory, random, encryptor, fileSystem, wwwCallFactory, localStorageDirPath, clientVersion, databaseDirectoryCreator, documentCollectionFactory, database); AgeBandBuilder ageBandBuilder = new AgeBandBuilder(logger, webCallFactory); Disney.Mix.SDK.Internal.RegistrationConfigurationGetter registrationConfigurationGetter = new Disney.Mix.SDK.Internal.RegistrationConfigurationGetter(logger, guestControllerClientFactory, ageBandBuilder); LegalMarketingErrorsBuilder legalMarketingErrorsBuilder = new LegalMarketingErrorsBuilder(registrationConfigurationGetter, languageCode, epochTime); sessionLogin = new SessionLogin(logger, guestControllerClientFactory, mixSessionStarter, database, legalMarketingErrorsBuilder, sessionFactory); sessionRegister = new SessionRegister(logger, guestControllerClientFactory, database, mixSessionStarter, sessionFactory); sessionRestorer = new SessionRestorer(logger, guestControllerClientFactory, database, sessionFactory); sessionReuser = new SessionReuser(logger, database, mixSessionStarter, sessionFactory); offlineSessionCreator = new OfflineSessionCreator(logger, sessionFactory, database); }
public void OfflineLastSession(string guestControllerHostUrl, string guestControllerSpoofedIpAddress, string mixApiHostUrl, string oneIdClientId, string mixClientToken, string clientVersion, ICoroutineManager coroutineManager, IKeychain keychain, AbstractLogger logger, string localStorageDirPath, string languageCode, Action <IOfflineLastSessionResult> callback) { CreateDependencies(guestControllerHostUrl, guestControllerSpoofedIpAddress, mixApiHostUrl, oneIdClientId, mixClientToken, clientVersion, coroutineManager, keychain, logger, localStorageDirPath, languageCode, out var _, out var _, out var _, out var _, out var offlineSessionCreator); IInternalOfflineLastSessionResult obj = offlineSessionCreator.Create(); callback(obj); }
public void ReuseExistingGuestControllerLogin(string guestControllerHostUrl, string guestControllerSpoofedIpAddress, string mixApiHostUrl, string oneIdClientId, string mixClientToken, string clientVersion, ICoroutineManager coroutineManager, IKeychain keychain, AbstractLogger logger, string localStorageDirPath, string swid, string accessToken, uint accessTokenTtl, string refreshToken, uint refreshTokenTtl, string displayName, string displayNameModeratedStatusDate, string proposedDisplayName, string displayNameProposedStatus, string etag, string ageBand, bool ageBandAssumed, string accountStatus, string dateOfBirth, string email, bool emailVerified, string firstName, string lastName, string middleName, string parentEmail, bool parentEmailVerified, string username, string languageCode, string countryCode, IEnumerable <KeyValuePair <string, bool> > marketingItems, Action <IReuseExistingGuestControllerLoginResult> callback) { CreateDependencies(guestControllerHostUrl, guestControllerSpoofedIpAddress, mixApiHostUrl, oneIdClientId, mixClientToken, clientVersion, coroutineManager, keychain, logger, localStorageDirPath, languageCode, out var _, out var _, out var _, out var sessionReuser, out var _); sessionReuser.Reuse(swid, accessToken, refreshToken, displayName, proposedDisplayName, displayNameProposedStatus, firstName, etag, ageBand, accountStatus, countryCode, callback); }
private static void Register(string guestControllerHostUrl, string guestControllerSpoofedIpAddress, string mixApiHostUrl, string oneIdClientId, string mixClientToken, string clientVersion, ICoroutineManager coroutineManager, IKeychain keychain, AbstractLogger logger, string localStorageDirPath, bool isTestProfile, string username, string password, string firstName, string lastName, string email, string parentEmail, string languageCode, string assertedCountry, DateTime?dateOfBirth, IEnumerable <KeyValuePair <IMarketingItem, bool> > marketingAgreements, IEnumerable <ILegalDocument> acceptedLegalDocuments, Action <IRegisterResult> callback) { CreateDependencies(guestControllerHostUrl, guestControllerSpoofedIpAddress, mixApiHostUrl, oneIdClientId, mixClientToken, clientVersion, coroutineManager, keychain, logger, localStorageDirPath, languageCode, out var _, out var sessionRegister, out var _, out var _, out var _); sessionRegister.Register(isTestProfile, username, password, firstName, lastName, email, parentEmail, languageCode, assertedCountry, dateOfBirth, marketingAgreements, acceptedLegalDocuments, callback); }
public void RegisterChildAccount(string guestControllerHostUrl, string guestControllerSpoofedIpAddress, string mixApiHostUrl, string oneIdClientId, string mixClientToken, string clientVersion, ICoroutineManager coroutineManager, IKeychain keychain, AbstractLogger logger, string localStorageDirPath, bool isTestProfile, string username, string password, string firstName, string parentEmail, string languageCode, DateTime?dateOfBirth, IEnumerable <KeyValuePair <IMarketingItem, bool> > marketingAgreements, IEnumerable <ILegalDocument> acceptedLegalDocuments, Action <IRegisterResult> callback) { Register(guestControllerHostUrl, guestControllerSpoofedIpAddress, mixApiHostUrl, oneIdClientId, mixClientToken, clientVersion, coroutineManager, keychain, logger, localStorageDirPath, isTestProfile, username, password, firstName, null, null, parentEmail, languageCode, null, dateOfBirth, marketingAgreements, acceptedLegalDocuments, callback); }