public async Task Invoke(HttpContext httpContext, ICurrentUserInformation currentUserInformation) { if (httpContext.Request.Headers.ContainsKey("userid")) { currentUserInformation.UserId = new Guid(httpContext.Request.Headers["userid"]); } await _next(httpContext); }
public CurrentUser( [NotNull] ICurrentUserInformation currentUserInformation, [NotNull] IDiverRepository diverRepository, [NotNull] UserManager <IdentityUser> userManager) { this.currentUserInformation = currentUserInformation ?? throw new ArgumentNullException(nameof(currentUserInformation)); this.diverRepository = diverRepository ?? throw new ArgumentNullException(nameof(diverRepository)); this.userManager = userManager ?? throw new ArgumentNullException(nameof(userManager)); }
public UserApiController( RequestImportUserInteractor requestImportUserInteractor, ConfirmImportUserInteractor confirmImportUserInteractor, ICurrentUserInformation currentUserInformation) { this.requestImportUserInteractor = requestImportUserInteractor; this.confirmImportUserInteractor = confirmImportUserInteractor; this.currentUserInformation = currentUserInformation; }
public CreateShareController(ShareInteractor shareInteractor, ICurrentUserInformation currentUserInformation) { this.shareInteractor = shareInteractor; this.currentUserInformation = currentUserInformation; }
public ActivityController(ActivityInteractor activityInteractor, ICurrentUserInformation currentUserInformation) { this.activityInteractor = activityInteractor; this.currentUserInformation = currentUserInformation; }
public DocumentController(DocumentsInteractor documentsInteractor, ICurrentUserInformation currentUserInformation) { this.documentsInteractor = documentsInteractor; this.currentUserInformation = currentUserInformation; }
public CommentsController(CommentsInteractor commentsInteractor, ICurrentUserInformation currentUserInformation) { this.commentsInteractor = commentsInteractor; this.currentUserInformation = currentUserInformation; }