Граф коммитов

77 Коммитов

Автор SHA1 Сообщение Дата
Victor Vuong 3284afcf59 Allow the HealthVault web configuration to allow the cert store to be specified. 2017-07-13 14:17:15 -07:00
David Woods d35667053a Merging changes from s65 back into master.
# Conflicts:
#	External/Nuget/nuget.exe
#	Microsoft.HealthVault.Client.Android/AndroidHealthVaultConnectionFactory.cs
#	Microsoft.HealthVault.Client.Bait/HealthVaultConnectionFactory.cs
#	Microsoft.HealthVault.Client.Ios/IosHealthVaultConnectionFactory.cs
#	Microsoft.HealthVault.Client.Uwp/UwpHealthVaultConnectionFactory.cs
#	Microsoft.HealthVault.IntegrationTest/ActionPlanTests.cs
#	Microsoft.HealthVault.RestApi/Generated/ActionPlanObjectives.cs
#	Microsoft.HealthVault.RestApi/Generated/ActionPlanObjectivesExtensions.cs
#	Microsoft.HealthVault.RestApi/Generated/ActionPlanTasks.cs
#	Microsoft.HealthVault.RestApi/Generated/ActionPlanTasksExtensions.cs
#	Microsoft.HealthVault.RestApi/Generated/ActionPlans.cs
#	Microsoft.HealthVault.RestApi/Generated/ActionPlansExtensions.cs
#	Microsoft.HealthVault.RestApi/Generated/Goals.cs
#	Microsoft.HealthVault.RestApi/Generated/GoalsExtensions.cs
#	Microsoft.HealthVault.RestApi/Generated/IActionPlanObjectives.cs
#	Microsoft.HealthVault.RestApi/Generated/IActionPlanTasks.cs
#	Microsoft.HealthVault.RestApi/Generated/IActionPlans.cs
#	Microsoft.HealthVault.RestApi/Generated/IGoals.cs
#	Microsoft.HealthVault.RestApi/Generated/IMicrosoftHealthVaultRestApi.cs
#	Microsoft.HealthVault.RestApi/Generated/IOnboarding.cs
#	Microsoft.HealthVault.RestApi/Generated/MicrosoftHealthVaultRestApi.cs
#	Microsoft.HealthVault.RestApi/Generated/Onboarding.cs
#	Microsoft.HealthVault.RestApi/Generated/OnboardingExtensions.cs
#	Microsoft.HealthVault.RestApi/HealthVaultRestCredentials.cs
#	Microsoft.HealthVault.RestApi/KnownRestHeaders.cs
#	Microsoft.HealthVault.UnitTest/Clients/ThingClientTests.cs
#	Microsoft.HealthVault.UnitTest/Microsoft.HealthVault.UnitTest.csproj
#	Microsoft.HealthVault.UnitTest/app.config
#	Microsoft.HealthVault.Web/WebHealthVaultFactory.cs
#	Microsoft.HealthVault/Clients/Deserializers/ThingDeserializer.cs
#	Microsoft.HealthVault/ItemTypes/ItemTypeRegistrar.cs
#	Microsoft.HealthVault/Thing/ItemTypeManager.cs
#	Microsoft.HealthVault/Thing/ThingTypeHandler.cs
2017-06-30 17:23:22 -07:00
suryaren b7222f9abf Enabled application custom thing types to be registered. (#65)
* Enabled application custom thing types to be registered.
1) Deleted old ItemTypeRegistrar and ItemTypeManager
2) Added IThingTypeRegistrar and exposed it via ConnectionFactory - as such thing type registration is not per connection lifecycle, so a seperate method to register thing type is exposed from ConnectionFactory for clients and webhealthvaultfactory for web
3) Added unit tests for thing type registrar an thingdeserializer

Enabled application custom thing types to be registered.

1) Deleted old ItemTypeRegistrar and ItemTypeManager
2) Added IThingTypeRegistrar and exposed it via ConnectionFactory - as such thing type registration is not per connection lifecycle, so a seperate method to register thing type is exposed from ConnectionFactory for clients and webhealthvaultfactory for web
3) Added unit tests for thing type registrar an thingdeserializer

Cherry-picked commit from targetting master to release branch

* Avoiding excessively lock for healthvaultconnection based on PR comment
2017-06-22 21:32:25 -07:00
David Rickard c8f2d537e4 Change autorest API to use ModernHttpClient and refactor rest authorization (#49)
* Removed the IHealthVaultRestClient, in favor of a IHealthVaultRestAuthorizer, which directly hooks into the auto-generated API.
* Updated auto-rest API to use ModernHttpClient
* Added default for the REST URL to point to US prod.

* Fixed broken unit tests by adding protections to only try and refresh the Web session credential if it is null or expired.

* Trigger a new PR build

* Consolidate to Microsoft.Rest.ClientRuntime 2.3.8

* Trigger a new PR build again
2017-06-08 15:06:05 -07:00
David Rickard c332a41f37 Switched OneSDK to expose NodaTime types instead of DateTime (#44)
Does not include the auto-generated REST client.
2017-06-02 16:43:44 -07:00
davidkwoods cab21f7fe3 Formatting Pass (#38)
- Ran the CoreFX CodeFormatter tool on the solution
- Exempted generated code, since it'll get out of date the next time we import from Swagger
- Adding copyright header to the tool, applying it to all cs files

#55403
2017-05-25 09:49:46 -07:00
davidkwoods 17fca07f9d Solution pass on Coding Style (#31)
- Includes OneSDK.vssettings file to codify many of the style rules.
- Updates README.md to highlight the official style guide.
- Ran a solution-wide Edit -> Format Document pass to bring files in line.
- Manual pass for renaming private/internal fields with _ or s_ naming convention.
2017-05-15 17:43:42 -07:00
suryaren dfec389568 Adding unit tests for connection and utility namespace under web project (#30)
* Adding Unit tests for HealthVault web project

Added unit tests for provider

Added unit tests for service instance provider class

Added unit tests for web connection info provider

Added unit tests for Offline and Web connection classes

Fixed few issues

Made classes to be IOC friendly to enable unit test mocks. Fixed few issues. Added some additional comments on tests. Test all sandbox apps and exisiting unit tests

* Added Unit tests for HealthVaultFactory

Added unit tests for online web connection

Adding offline connection unit tests

Completed unit tests for webhealthvaultfactory class

Cleaned up using statements

Added unit tests for shellurlbuilder

* Delete Unit tests for certificate info provider

* Resolved merge issues
2017-05-15 13:01:25 -07:00
David Rickard feb4294fd3 Removed the downgrade for .NET Standard (#29)
* Removed the downgrade for .NET Standard
* We now reference the latest NETStandard.Library: 1.6.1
* An update to the rest client library let us upgrade JSON library to 10.0.2
* We no longer ask for specific versions in the .nuspec files
* Fixed crashing issue for UWP Native mode by specifying the neutral resource language in the PCLs.

This still does not work for Windows Phone, but it appears there isn't anything we can do for that for now. The bug has been reported to the .NET team and they are following up.

Verified that all sandbox and sample apps run.
2017-05-12 12:20:49 -07:00
Surya Renduchintala dd6bfd4236 Removing commented out code and usage of servicelocator
Resolved usage of servicelocator based on review comments
2017-05-10 09:07:52 -07:00
Surya Renduchintala 661f07cfe6 Adding Unit tests for HealthVault web project
Added unit tests for provider

Added unit tests for service instance provider class

Added unit tests for web connection info provider

Added unit tests for Offline and Web connection classes

Fixed few issues

Made classes to be IOC friendly to enable unit test mocks. Fixed few issues. Added some additional comments on tests. Test all sandbox apps and exisiting unit tests
2017-05-10 09:07:52 -07:00
David Rickard 7c56fce84d Fix clrcompression.dll error on Windows Phones
Forced NetStandard library version 1.6.0 everywhere and rolled back NuGet references to make sure we get old version of System.IO.Compression.dll . Needed to remove the [Serializable] attributes from some exceptions because that nuget package brought back the troublemaker compression DLL.
2017-05-09 11:05:39 -07:00
David Rickard 667d4ae4c8 Applying version to built DLLs.
Refactored some common properties for .NET Standard projects to NetStandard.Common.targets, including version. Updated assembly version script to update this file, and changed other projects to use SharedVersionInfo.cs so it picks up the new version that the script writes to it.
Also updated script to no longer require the versions to be a specific value in order to do the replacement
2017-05-02 13:36:49 -07:00
David Rickard 904923307a Fixed System.Net.Http load error and updated to new application instance ID that has required permissions. 2017-05-01 12:57:46 -07:00
Surya Renduchintala 960cb40ec5 Fix for the nuget not getting restored on Client platforms. Restore the exact version of Microsoft.Rest.ClientRuntime 2017-04-28 10:13:58 -07:00
David Rickard 8791d61e67 Moved back to IServiceLocator based connection creation and fixed unit tests from rebasing. 2017-04-25 11:43:19 -07:00
David Rickard 39126dd495 Fixed broken web project. 2017-04-25 11:17:30 -07:00
David Rickard d84577dc3c Unit tests and some fixes for bugs encountered when writing them.
* Added tests for HealthVaultSodaConnection, HealthVaultConnectionFactoryInternal and ShellAuthService.
* Fixed possibility of null reference when calling HealthVaultSodaConnection.AuthorizeAdditionalRecordsAsync before doing initial auth.
* Fixed connection adding an extra unnecessary "/wildcat.ashx" at the end of the platform URL.
* Renamed HealthVaultUrl and HealthVaultShellUrl to DefaultHealthVaultUrl and DefaultHealthVaultShellUrl to emphasize that these are only the starting URLs and they can be bounced to another location.
* Refactored HealthVaultConnectionBase to take more dependencies on the constructor rather than resolve dynamically from the IoC.
2017-04-25 11:17:01 -07:00
Surya Renduchintala 693fce674c Tested uwp app with all the changes 2017-04-25 09:25:52 -07:00
David Woods 4280753be2 Updating .csproj and .nuspec files to include generated xml docs 2017-04-18 12:23:34 -07:00
Aviad Ezra 2c041fd230 Merged PR 7167: Convert OneSDK projects from Portable library to .NET Standrand
Convert OneSDK projects from Portable library to .NET Standrand
2017-04-18 06:08:55 +00:00
Brendan Kowitz 3e6e3a37cf Merged PR 7124: Add REST API support to OneSDK
Related work items: #53880
2017-04-14 19:08:48 +00:00
David Woods 1e62736b56 Merged PR 7112: Back to basics after repo split
Reintroducing .gitconfig and .gitattributes and reconfiguring NuGet references after the repo split

Related work items: #54301
2017-04-13 05:32:46 +00:00
David Woods 61c7759cd7 Merged PR 7106: Todo Cleanup
Cleaning up TODOs and warnings

Related work items: #53807
2017-04-12 23:42:53 +00:00
Surya Renduchintala 5718ec8043 Merged PR 7088: Fix web project in loading up the right Nuget versions
Fix web project in loading up the right Nuget versions
2017-04-12 18:33:52 +00:00
Brendan Kowitz a9db42bbbb Merged PR 7055: Refactor of messages to have greater separation of concerns
Refactor of messages to have greater separation of concerns

* Renames HealthVaultRequest to HealthVaultMessage
* Removes Connection references from HealthVaultMessage
* Removes HealthWebRequestFactory
* Renames EasyWebRequest
2017-04-11 22:30:11 +00:00
Surya Renduchintala c6abe55333 Merged PR 7070: Added sandbox web project
Added sandbox web project

Added a redirect controller to take care of shell Action target query

Resolved bugs and made the sandbox web app work with no issues in Offline and Online scenarios.
2017-04-11 18:34:02 +00:00
Surya Renduchintala de51de5efb Merged PR 7017: Moved creating Clients to connection.
Moved creating Clients to connection.
Deleted ClientHealthVaultFactory
Modifed implementation
2017-04-10 17:57:52 +00:00
Surya Renduchintala 540310c397 Merged PR 6908: Implementation of Cookie Manager
Implementation of Cookie Manager
2017-04-07 18:22:52 +00:00
Aviad Ezra 5b29ec4e2e Merged PR 6925: Initial Refactoring for HealthVaultConfiguration 2017-04-05 20:35:20 +00:00
David Woods 8d16af5b26 Merged PR 6860: Updating Grace to 6.0.1
Updating our Grace dependency to version 6.0.1 so its NuGet package will install properly.
2017-04-03 17:36:06 +00:00
Surya Renduchintala 7d486333c0 Merged PR 6850: Implemented WebHealthVaultConnection and OfflineHealthVaultConnection and
Implemented WebHealthVaultConnection and OfflineHealthVaultConnection and related classes:-
Implemented WebSessionCredentialClient, CertificateInfoProvider

Implemented RequireSignInAttribute to authenticate the request

Delted obsolote Web and MVC projects

Related work items: #50477
2017-04-03 17:14:29 +00:00
Ben Thomas 12f40c6442 Merged PR 6839: Changed GetPersonInfo to GetAuthorizedPeople.
Changed GetPersonInfo to GetAuthorizedPeople.

Related work items: #53562
2017-03-30 19:35:02 +00:00
David Woods 16529dae39 Merged PR 6796: Fixing build warnings
Fixing most build warnings

- Lots of comments requiring an updated exception type and a changed method name.
- Lots of warnings from comments referencing exceptions from System.
- Skipped .Web and .Web.Mvc, which are about to have a lot of churn.
2017-03-30 16:25:15 +00:00
Aviad Ezra 30a54dcc29 Merged PR 6768: Move factory methods from HealthVaultConnection to HealthVaultFactory
+ Move Get*Client methods from HealthVaultConnection to HealthVaultFactory
+ Classes that need IHealthVaultConnection  shouldn't depend on IConnectionInternal
+ Remove public Connection property from Client classes
+ Added TODO to eliminate circular call in Connection class

First review, still requires some testing
2017-03-27 18:06:12 +00:00
David Rickard (USA) a9de894e5a Merged PR 6757: Deauthorize support for client SDK
Added DeauthorizeApplicationAsync to client connection, which deletes connection information and deauthorizes the app for all authorized records.
Changed GetConnection method to a synchronous one that does not try to run authentication, making it on-demand.
Updated PersonInfo property to GetPersonInfoAsync() to support idea that the connection object might not have the information on hand.
Moved SessionCredential and ServiceInfo properties off of the public IHealthVaultConnection to IConnectionInternal
Fixed bug in android browser auth broker that caused it to fail on the second attempt.
Fixed Delete method in UwpSecretStore.
Fixed build/publish configurations for SandboxUwp project.
2017-03-24 23:36:24 +00:00
Aviad Ezra 75c9fda0bd Merged PR 6727: Merge personal/avezra/sdk-refactor to feature/base-sdk
Replace base class HealthVaultFactoryBase with ConnectionState (composition instead of inheritance).

Move IoC registration to top
2017-03-23 06:47:43 +00:00
David Rickard (USA) a0d761e4df Merged PR 6711: UWP sample connecting
UWP sample is now connecting and getting through auth flow. Will switch the GetAuthorizedPeople call over in another checkin.
2017-03-22 21:14:28 +00:00
David Woods 1a38b9f80e Merged PR 6554: IFileStore for Windows
- Implementing the Windows FileStore with Read, Write, and Delete

Related work items: #49935
2017-03-16 19:10:16 +00:00
Ben Thomas 6f5743cf80 Merged PR 6614: Merge personal/bentho/mvc-xml-nugets to feature/base-sdk
Adding required nugets to MVC sample app
2017-03-16 17:31:22 +00:00
David Rickard (USA) 1d5a6f6f41 Merged PR 6601: Merging ItemTypes project, updating to resx
* Moved item types into the core project and deleted the ItemTypes project
* Changed resources to .resx format. Added missing resources, removed a lot of the exception methods on the validation class.
* Added new base exception type
2017-03-16 17:09:53 +00:00
Surya Renduchintala 04f6d544b8 Merged PR 6581: Merge personal/suryar/clean-crypto to feature/base-sdk
1. Deleted code that deals with Crypto stuff which is no longer being used. The crypto stuff in the new world is being provided by ICryptographer
2. Untangled web code from core sdk part.
3. Moved code into specific folders
4. Added some methods in platform client.

Related work items: #49905
2017-03-16 04:52:05 +00:00
David Woods 9d174ae338 Merged PR 6538: Protecting Configuration sets on the WebHealthVaultFactory
- Allowing consumers to set the configuration for the WebHealthVaultFactory
- Also protecting configuration sets once a connection has been created

Related work items: #49608
2017-03-15 20:04:47 +00:00
William Shelor 27c6123a54 Merged PR 6491: Merge personal/wishel/rename-thing to feature/base-sdk 2017-03-14 17:54:32 +00:00
David Woods ede2ffb4d8 Merged PR 6498: Implementing TODO items
Implementing TODO items

- Converting old code to use IConnection.ExecuteAsync
- Throwing exceptions when setting Configuration after getting a Connection (Web side blocked waiting on other commits)

Related work items: #49608
2017-03-13 23:56:36 +00:00
David Rickard (USA) 76a5664318 Merged PR 6506: Implement client connection class
Implemented client connection class. Needed to refactor the session credential client a bit since the client project needs different data to call it. The ISessionCredentialClient is now provided by a CreateSessionCredentialClient abstract method on the Connection class. Each SDK supplies its own version.

Also made ApplicationId an abstract property on connection so a setter is not required.

Implemented NewApplicationCreationInfo method on PlatformClient.
2017-03-13 18:37:27 +00:00
Ben Thomas bde9ff2849 Merged PR 6487: Merge personal/bentho/core-cleanup to feature/base-sdk 2017-03-13 17:18:46 +00:00
David Woods 99ccfb9698 Merged PR 6483: Cleaning up some magic strings
- Adding constants for Cryptography algorithms
- Switching HV method parameters from strings to enums

Related work items: #49906
2017-03-10 17:29:38 +00:00
hatims 70830287a9 Merge branch 'feature/base-sdk' 2017-03-09 16:34:57 -08:00
David Rickard (USA) 884e4b04b8 Merged PR 6486: More configuration refactoring
* Removed IConfiguration interface in favor of HealthVaultConfiguration.
* Updated client to register the config as both ClientConfiguration and HealthVaultConfiguration.
* Removed AllowInstanceBounce from ClientConfiguration as the base already has MultiInstanceAware.
* Updated ShellAuthService to respect the IsMultiRecordApp flag
* Removed some unused extension methods
* Updated some code to read service info off of the connection rather than the "default" values in config.
2017-03-10 00:24:23 +00:00