public bool addBid(HighestBidDTO highestBidDTO, string auctionId) { var identifier = BasicAutenticationParser.ParseAuthorizationHeader(HttpContext.Current.Request.Headers["Authorization"]); var bid = Mapper.ToBid(highestBidDTO, auctionId, identifier.Name); return(_DBManager.AddBid(bid)); }
public void addAuction(AuctionAddingDTO auctionAddingDto) { var identifier = BasicAutenticationParser.ParseAuthorizationHeader(HttpContext.Current.Request.Headers["Authorization"]); var auction = Mapper.ToAuction(auctionAddingDto, identifier.Name); _DBManager.AddAuction(auction); }
/// <summary> /// Parses the Authorization header and creates user credentials /// </summary> /// <param name="actionContext"></param> protected virtual BasicAuthenticationIdentity ParseAuthorizationHeader(HttpActionContext actionContext) { return(BasicAutenticationParser.ParseAuthorizationHeader(actionContext)); }