/// <summary> /// Gets the notifications auth. /// </summary> /// <param name="token"></param> /// <returns></returns> public async Task <NotificationsAuthDto> GetNotificationsAuth(string token) { try { string userId = await _commonOperationsManager.VerifyToken(token); var auth = new NotificationsAuthDto() { Username = userId, Password = userId }; return(auth); } catch (AuthenticationException) { throw new AuthenticationException(); } catch (Exception e) { throw new Exception(e.Message); } }
/// <summary> /// Registers a user to the notifications service. /// </summary> /// <param name="authDto"></param> /// <returns></returns> public async Task Register(NotificationsAuthDto authDto) => await _xmpp.Register(authDto.Username, authDto.Password);