public async Task <IActionResult> Index( [FromServices] IGraphSdkHelper helper, string deltaToken ) { var viewModel = new IndexViewModel(); // Get the files if user is authenticated if (User.Identity.IsAuthenticated) { var deltaFiles = await GetRootFilesAsync(helper, deltaToken); // deltaFiles is null when user is no more authenticated if (deltaFiles != null) { viewModel.Items = deltaFiles.Files; viewModel.DeltaToken = deltaFiles.DeltaToken; } else { return(RedirectToAction("SignIn", "Account")); } } return(View(viewModel)); }
public HomeController(IConfiguration configuration, IHostingEnvironment hostingEnvironment, IGraphSdkHelper graphSdkHelper) { _configuration = configuration; _env = hostingEnvironment; _graphSdkHelper = graphSdkHelper; }
public TaskProvider(IGraphSdkHelper httpHelper, IRootConfigurationProvider rootConfigurationProvider) { this.httpHelper = httpHelper; var appOptions = rootConfigurationProvider.GeneralConfiguration; ProposalManagerApiUrl = appOptions.ProposalManagerApiUrl; }
//private readonly IHttpContextAccessor httpContextAccessor; public GraphService(MemoryCache memoryCache, IGraphSdkHelper graphSdkHelper, IGraphAuthProvider authProvider) { this.memoryCache = memoryCache; this.graphClientForUser = graphSdkHelper.GetAuthenticatedClientForUser(); //this.graphClientForApplication = graphSdkHelper.GetAuthenticatedClientForApplication(); this.authProvider = authProvider; //this.httpContextAccessor = httpContextAccessor; }
public HomeController(ILogger logger, IMediator mediator, SignInManager <AppUser> signInManager, IGraphSdkHelper graphSdkHelper, IClaimsCache claimsCache) { _logger = logger ?? throw new ArgumentNullException(nameof(logger), "Constructor paramater 'logger' cannot be null. EID: 4EA3B1CB"); _mediator = mediator ?? throw new ArgumentNullException(nameof(mediator), "Constructor paramater 'mediator' cannot be null. EID: 2F98944F"); _signInManager = signInManager ?? throw new ArgumentNullException(nameof(signInManager), "Constructor parameter 'signInManager' cannot be null. EID: CAB1C1B5"); _graphSdkHelper = graphSdkHelper ?? throw new ArgumentNullException(nameof(graphSdkHelper), "Constructor parameter 'graphSDKHelper' cannot be null. EID: F76DF56E"); _claimsCache = claimsCache ?? throw new ArgumentNullException(nameof(claimsCache), "Constructor parameter 'claimsCache' cannot be null. EID: 57F6DF27"); }
public DocumentController(IConfiguration configuration, IGraphSdkHelper graphSdkHelper) : base(configuration, graphSdkHelper) { // Get from config ProposalManagerId = "d6132f2f-f4db-4a2b-9ca4-bff6a1cb557f,35f14f56-d9d3-42a1-af97-d1f04c0a076d"; SiteId = "agilesightms.sharepoint.com"; ListId = "opportunities"; SharedDocListId = "55e997af-a31d-4188-aab5-6747a30508d1"; }
public DocumentController(IConfiguration configuration, IGraphSdkHelper graphSdkHelper) : base(configuration, graphSdkHelper) { // Get from config var appOptions = new AppOptions(); configuration.Bind("AppOptions", appOptions); ProposalManagerApiUrl = appOptions.ProposalManagerApiUrl; SiteId = appOptions.SiteId; }
public AdministrationController( IConfiguration configuration, ILogger <AdministrationController> logger, IUnitOfWork unitOfWork, IGraphSdkHelper graphSdkHelper) { _logger = logger; _unitOfWOrk = unitOfWork; _configuration = configuration; _graphSdkHelper = graphSdkHelper; }
public DocumentController( IGraphSdkHelper graphSdkHelper, IRootConfigurationProvider rootConfigurationProvider) : base(graphSdkHelper) { // Get from config var appOptions = rootConfigurationProvider.GeneralConfiguration; ProposalManagerApiUrl = appOptions.ProposalManagerApiUrl; SiteId = appOptions.SiteId; httpHelper = graphSdkHelper; }
private async Task <DeltaFiles> GetRootFilesAsync(IGraphSdkHelper helper, string deltaToken) { try { var client = helper.GetAuthenticatedClient((ClaimsIdentity)User.Identity); return(await client.GetRootFilesAsync(deltaToken)); } catch (ServiceException se) when(se.Error.Code == "TokenNotFound") { // May be token cache has been lost return(null); } }
public MeetingService(IMeetingDBService meetingDBService, IFileService fileService, ICalendarService calendarService, IPlanTaskService planTaskService, IViewRenderService viewRenderService, IUserService userService, ICommunicationService communicationService, INotesService notesService, IGraphSdkHelper graphSdkHelper) : base(graphSdkHelper) { _meetingDBService = meetingDBService; _fileService = fileService; _calendarService = calendarService; _planTaskService = planTaskService; _viewRenderService = viewRenderService; _notesService = notesService; _userService = userService; _communicationService = communicationService; }
public UserService(IGraphSdkHelper graphSdkHelper, IMemoryCache memoryCache) : base(graphSdkHelper) { _memoryCache = memoryCache; }
public AuthController(IGraphSdkHelper graphSdkHelper) { _graphSdkHelper = graphSdkHelper; }
public CommunicationService(IGraphSdkHelper graphSdkHelper) { _graphSdkHelper = graphSdkHelper; //_graphClient = _graphSdkHelper.GetDaemonAppClient(); }
public GraphController(IConfiguration configuration, IGraphSdkHelper graphSdkHelper, IGraphAuthProvider authProvider) { _configuration = configuration; _graphSdkHelper = graphSdkHelper; _authProvider = authProvider; }
public HomeController(ILogger <HomeController> logger, IGraphSdkHelper graphSdkHelper) { _logger = logger; _graphSdkHelper = graphSdkHelper; }
public CompanyController(IConfiguration configuration, IGraphSdkHelper graphSdkHelper) : base(configuration, graphSdkHelper) { }
public MVCGraphController(IGraphSdkHelper graphSdkHelper) { _graphSdkHelper = graphSdkHelper; }
public BaseController(IGraphSdkHelper graphSdkHelper) => GraphHelper = graphSdkHelper;
public FileService(IGraphSdkHelper graphSdkHelper) : base(graphSdkHelper) { }
public HomeController(IGraphSdkHelper graphSdkHelper, IMemoryCache memoryCache, MSALLogCallback msalLog) : base(memoryCache) { _graphSdkHelper = graphSdkHelper; _msalLog = msalLog; }
public CalendarService(IGraphSdkHelper graphSdkHelper) : base(graphSdkHelper) { }
public BaseGraphService(IGraphSdkHelper graphSdkHelper) { _graphSdkHelper = graphSdkHelper; GraphClient = _graphSdkHelper.GetAuthenticatedClient(); }
public ProxyController(IConfiguration configuration, IWebHostEnvironment hostingEnvironment, IGraphSdkHelper graphSdkHelper) { _graphSdkHelper = graphSdkHelper; }
public PlanTaskService(IGraphSdkHelper graphSdkHelper) : base(graphSdkHelper) { }
public NotesService(IGraphSdkHelper graphSdkHelper) : base(graphSdkHelper) { }
public HomeController(IGraphSdkHelper graphSdkHelper) { this._graphSdkHelper = graphSdkHelper; }
public TestController(IGraphSdkHelper graphSdkHelper, INotesService notesService) { _graphSdkHelper = graphSdkHelper; _notesService = notesService; }
public BaseController(IConfiguration configuration, IGraphSdkHelper graphSdkHelper) { this.Configuration = configuration; this.GraphHelper = graphSdkHelper; }
public TestClaimsTransformation(IGraphSdkHelper graphSdkHelper, ILogger <TestClaimsTransformation> logger, IHttpContextAccessor httpContextAccessor) { _graphSdkHelper = graphSdkHelper; _logger = logger; _httpContextAccessor = httpContextAccessor; }