Commit Graph

37666 Commits

Author SHA1 Message Date
Chris Ross 63fc18b945 React to auth feature API changes. 2015-04-24 09:57:49 -07:00
Chris Ross b64618bc2d React to auth API changes. Remove extra dependencies. 2015-04-24 09:55:14 -07:00
Chris Ross 59e40904ad Remove redundant websocket sample code. 2015-04-24 09:50:36 -07:00
Chris Ross 43a38c1b58 Reorder Challenge parameters. 2015-04-24 08:51:30 -07:00
Henk Mollema 0bfebf7fac Use `string.IsNullOrEmpty()` instead of empty string check. 2015-04-24 15:45:22 +02:00
Hao Kung 69d42502a6 React to WebHostBuilder 2015-04-24 00:11:58 -07:00
Hao Kung 5093c06b2a Fix program main to actually use config 2015-04-24 00:10:36 -07:00
Hao Kung 234bbf82f2 Hosting API Review changes
- Introduce WebHostBuilder
2015-04-23 23:51:29 -07:00
Hao Kung 60fd1f28b9 React to security changes 2015-04-23 23:00:20 -07:00
Hao Kung a71dc5858d React to Security changes 2015-04-23 22:57:17 -07:00
Hao Kung 87c31c5526 Switch to IUrlEncoder, introduce AddAuthentication 2015-04-23 22:49:47 -07:00
Hao Kung c251bf0162 Add RefreshSignIn 2015-04-23 22:17:24 -07:00
Doug Bunting 3fd4991959 Bind to readonly non-`null` collections
- part 1/2 of #2294
- handle readonly non-`null` collections in relevant binders
 - `CollectionModelBinder.CopyToModel()` and `MutableObjectModelBinder.AddToProperty()` methods
 - handle read-only controller properties in `DefaultControllerActionArgumentBinder`
 - do not copy into arrays e.g. add `CopyToModel()` override in `ArrayModelBinder`
- remove ability to set a private controller property
 - confirm `SetMethod.IsPublic` in `DefaultControllerActionArgumentBinder`
- avoid NREs in `GetModel()` overrides

Test handling of readonly collections
- previous tests barely touched this scenario
- also add more tests setting controller properties

nits:
- add missing `[NotNull]` attributes
- add missing doc comments
- consolidate a few `[Fact]`s into `[Theory]`s
- simplify some wrapping; shorten a few lines
- remove dead code in `DefaultControllerActionArgumentBinder` and `ControllerActionArgumentBinderTests`
2015-04-23 20:11:09 -07:00
Ajay Bhargav Baaskaran a80a333fea [Fixes #1489] Support for named route in form tag helper 2015-04-23 17:08:38 -07:00
Chris Ross b0d0e94aba Handle Authentication and WebSocket API changes. 2015-04-23 16:06:18 -07:00
Chris Ross 06e24a8fdf Handle null auth, null descriptions. 2015-04-23 16:05:05 -07:00
Chris Ross 0ed2692ef4 #267, #273, Move WebSocket APIs to their own object, fix context object. 2015-04-23 15:16:26 -07:00
Chris Ross cc1a24b949 #273 - Use POCOs for auth context objects. 2015-04-23 15:16:23 -07:00
Chris Ross a174bb299e #270 Rename auth wrapper's internal collections to Items. 2015-04-23 15:15:03 -07:00
Chris Ross 4637a95157 #266 Consolidate authentication APIs. 2015-04-23 15:15:02 -07:00
Ajay Bhargav Baaskaran 37e819ce85 [Fixes #2085] Using custom HtmlEncoder in unit tests - part 2 2015-04-23 13:36:54 -07:00
Ajay Bhargav Baaskaran 5da8ba7769 [Fixes #2085] Using custom HtmlEncoder in unit tests 2015-04-23 13:16:27 -07:00
Chris Ross 017e44ae95 Handle FileProviders package changes. 2015-04-23 12:56:10 -07:00
Chris Ross 6ae3d90ad0 Handle changes in FileProviders. 2015-04-23 12:18:49 -07:00
Chris Ross 663bf4f0f9 Handle FileProviders package rename. 2015-04-23 11:59:17 -07:00
Chris Ross af641b1ca5 Handle removal of HttpResponse.SendAsync extension. 2015-04-23 11:40:47 -07:00
Glenn Condron 57fa794e73 Update GettingStartedDeb.md
remove TODO comment
2015-04-23 11:10:43 -07:00
Eilon Lipton f76c712b2b More typos and whatnot 2015-04-23 11:10:43 -07:00
Eilon Lipton 1b7ae2029f Text cleanup 2015-04-23 11:10:43 -07:00
glennc f37488fa3b Update readme, add linux md, move samples to folders for each version of DNX. 2015-04-23 11:10:43 -07:00
Kiran Challa 687ab258a1 Logging for filters 2015-04-23 06:38:45 -07:00
Suhas Joshi 791173fda8 Update security stamp when setting username 2015-04-22 17:46:44 -07:00
Suhas Joshi afff831d62 Updating stores to use TypeDescriptor for type conversion 2015-04-22 17:23:03 -07:00
Ajay Bhargav Baaskaran 1511ea34a8 [Fixes #662] Throw if controller cannot be activated 2015-04-22 16:15:48 -07:00
Harsh Gupta 4df7d52210 PR Comments 2015-04-22 14:40:16 -07:00
Harsh Gupta 86fcacea92 Fix for #2357 : We prevent assigining null values to non nullable controller properties. 2015-04-22 14:40:14 -07:00
Harsh Gupta 53ef8258bb The model state keys for body bound models which are bound at property will use the entire model name with this change for example
Consider

public class Person
{
    [FromBody]
    public Address Address { get; set; }
}

public class Address
{
   [Required]
   public string Street { get; set; }

   public int Zip { get; set; }
}

Request body { "Zip" : 12345 }
In this case the error key would be "prefix.Address.Street" (assuming there is a prefix because of additional metadata/positioning for/of the Person model).

public class Person
{
       [Required]
       public string Name { get; set; }
}

public void Action([FromBody]Person p)
{
}
Request body { }
In this case the prefix gets ignored and the error key is Name.
Please note this is so that we are compatible with MVC 5.0

public class Person
{
       [Required]
       public string Name { get; set; }
}

public void Action([FromBody][ModelBinder(Name = "prefix")] Person p)
{
}

public void Action2([FromBody][Bind(Name = "prefix")] Person p)
{
}
Request body { }
In both these cases (Action and Action2) the prefix gets ignored and the error key is Name.
This is a slight improvement from mvc, as in MVC the action parameter would be null.

The followup for this would be to fix #2416 -
This PR ignores the validation assuming that #2416 will address the issues and update the test.

NOTE: previous versions of mvc did not have property binding and hence there is no precedence in this case. For MVC and Web API it was possible to body bind an action parameter which used an empty prefix instead of a parameter name for adding errors to model state (In case of MVC if a custom prefix was provided, it failed binding from body i.e the parameter was null).
2015-04-22 14:02:08 -07:00
Kirthi Krishnamraju 924d50bd8f Added functionaltests for JsonPatchDocument 2015-04-22 13:44:25 -07:00
Kirthi Krishnamraju 3042a62ba9 Removed Test operation code and changed T to TModel 2015-04-22 13:44:20 -07:00
Kirthi Krishnamraju bf712263fc Fix for #2280 - Cannot do an "add" patch to IList<Anything>
Added unit tests
2015-04-22 13:44:14 -07:00
Kirthi Krishnamraju e48565dcd8 Adding errors in ModelState 2015-04-22 13:44:09 -07:00
Kirthi Krishnamraju 9f97d25e02 Moved exception messages to resource file and updated tests to validate exception messages 2015-04-22 13:44:04 -07:00
Hao Kung a001cd4f2a React to Security logging change 2015-04-22 12:51:19 -07:00
Chris Ross de69da85fe Fix dependencies. 2015-04-22 12:36:13 -07:00
Hao Kung 30d350da26 Move logger to base handler and moar var 2015-04-22 12:23:54 -07:00
Ryan Nowak f3679f214e Fix #1712 - remove reflection from validation code in MutableObjectModelBinder
This change moves [BindingBehavior(...)] and friends into the model
metadata layer, and removes the reflection code from
MutableObjectModelBinder that was looking for them previously.
2015-04-22 12:10:45 -07:00
Kirthi Krishnamraju 9d2b1822d9 Fix for #819 : Attribute Routing: Resolve Name + Token Replacement 2015-04-22 11:47:23 -07:00
Chris Ross 25aed6f88e #274 Reorganize the strong header type extensions. Remove SendAsync extensions. 2015-04-22 11:43:12 -07:00
Henk Mollema 92554fa634 Utilize `nameof` operator 2015-04-22 10:57:50 -07:00
Chris Ross 7b7667e338 Fix DataProtection dependency. 2015-04-22 10:23:36 -07:00