Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
 public UserApiController(
     RequestImportUserInteractor requestImportUserInteractor,
     ConfirmImportUserInteractor confirmImportUserInteractor,
     ICurrentUserInformation currentUserInformation)
 {
     this.requestImportUserInteractor = requestImportUserInteractor;
     this.confirmImportUserInteractor = confirmImportUserInteractor;
     this.currentUserInformation      = currentUserInformation;
 }
Exemplo n.º 4
0
 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;
 }