Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Dev #272

Closed
wants to merge 235 commits into from
Closed

Dev #272

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
235 commits
Select commit Hold shift + click to select a range
b1acd99
Remove NullLoggerFactory workaround from the sample.
Tratcher May 7, 2014
f8f3e34
Sort dependencies and remove duplicates in dependencies
ChengTian May 8, 2014
9d0de16
Create LICENSE.txt
Eilon May 8, 2014
d02f76a
Updating copyright headers
anpete May 9, 2014
e2d3598
Create cookie auth middleware with DI.
Tratcher May 8, 2014
cf7ffe1
Fix sample.
Tratcher May 9, 2014
d950292
Moving interface members to extension methods
sebastienros May 5, 2014
de9769b
Create README.md
glennc May 13, 2014
823eead
Create CONTRIBUTING.md
Eilon May 13, 2014
75759da
Updating kproj file to match tooling changes
pranavkm May 19, 2014
ba6488f
Fixed project.json casing
davidfowl May 26, 2014
8d43a4f
Adding switch to build.cmd to skip KRE install
pranavkm Jun 3, 2014
e740d07
Updating build.sh based on KRuntime changes
pranavkm Jun 11, 2014
8841f64
Change the default author in makefile.shade
ChengTian Jun 18, 2014
faf98f8
Bump version to 1.0.0-*
bricelam Jun 19, 2014
4ca0a78
Updating release Nuget.config
bricelam Jun 20, 2014
779de7a
Updating dev Nuget.config
bricelam Jun 20, 2014
81c06fa
Make middleware report when auth fails.
Tratcher Jun 30, 2014
287eebe
Handle change from IList to IEnumerable.
Tratcher Jul 3, 2014
ea98a50
Renamed configurations to frameworks in project.json
davidfowl Jul 14, 2014
8307e9b
Reacting to System.Collections versioning change
pranavkm Jul 14, 2014
8b46d43
Make middleware report when auth fails (async).
Tratcher Jul 16, 2014
fadf6ae
Add missing sample namespace.
Tratcher Jul 16, 2014
e09448a
Update solution.
Tratcher Jul 16, 2014
8b0500d
Replace RNGCryptoServiceProvider with RandomNumberGenerator
pranavkm Jul 17, 2014
c733aa8
#28 - Use a GZipStream constructor that's supported on Mono.
Tratcher Jul 25, 2014
382573a
Updating release Nuget.config
pranavkm Aug 5, 2014
d5ce9fe
Updating dev Nuget.config
pranavkm Aug 6, 2014
05804c7
Port more security tests from Katana.
Tratcher Aug 6, 2014
c74e583
Removed source files from the project
davidfowl Aug 15, 2014
fabdb3b
Reacting to System.IO package version change
pranavkm Aug 20, 2014
919fa0c
Port Facebook middleware from Katana.
Tratcher Aug 8, 2014
0cc85f6
Reacting to System.IO package version change
Tratcher Aug 20, 2014
5577159
#37 - Port the Google auth middleware from Katana.
Tratcher Aug 22, 2014
b9eb7ba
#38 - Port the Twitter middleware from katana
Tratcher Aug 25, 2014
536da06
Updated to use the new target framework in project.json
davidfowl Aug 29, 2014
3a3816a
#41 - Port MicrosoftAccount middleware from Katana.
Tratcher Aug 29, 2014
6b0c51a
Renamed Project.json to Project.json2
Tratcher Aug 29, 2014
06bdceb
Fixed project.json casing
Tratcher Aug 29, 2014
565fde5
Fixed packages
davidfowl Sep 3, 2014
810c96e
Updated to use the new target framework in project.json
davidfowl Sep 4, 2014
214b82e
Updated build.cmd
davidfowl Sep 5, 2014
80c8891
#49 - OAuth base middleware.
Tratcher Sep 3, 2014
77f9fc4
Update dependecy versions.
Tratcher Sep 8, 2014
43fdf2a
Upgrade Newtonsoft.Json to 6.0.4 version
ChengTian Sep 10, 2014
13adde6
Update the method used to read JSON asynchronously
ChengTian Sep 10, 2014
51c3dc9
Handle IBuilder rename to IApplicationBuilder.
Tratcher Sep 10, 2014
f6d6f31
#32 - Port Cookie chunking from Katana.
Tratcher Sep 9, 2014
d6b82b8
#32 - Port cookie auth session store from Katana. Add MemoryCache sam…
Tratcher Sep 9, 2014
83bffe3
#32 - Port Cookies OnSignedIn notification from Katana.
Tratcher Sep 9, 2014
b10cda8
#32 - Port Cookies OnException notification from Katana.
Tratcher Sep 9, 2014
a9e40ac
Properly delete the correlation cookie. See Katana #230.
Tratcher Sep 9, 2014
f258724
#32 - Honor AuthenticationProperties.AllowRefresh.
Tratcher Sep 9, 2014
55f8b9d
Rebase.
Tratcher Sep 12, 2014
07b3fe2
#32 - Port comment and flow cleanup from Katana.
Tratcher Sep 12, 2014
35ad3ec
Code cleanup.
Tratcher Sep 15, 2014
b832636
Clean sample dependencies.
Tratcher Sep 15, 2014
1a6b6fd
Updating release NuGet.config
pranavkm Sep 17, 2014
ffedd04
Updating dev NuGet.config
pranavkm Sep 17, 2014
43cdd54
Removing declaration expressions
pranavkm Oct 1, 2014
0f9ac1f
#52 - Set a default user-agent for the OAuth backchannel.
Tratcher Sep 24, 2014
23c024e
Fixup references
davidfowl Oct 5, 2014
3426034
Use DI activated options for auth middlewares
HaoK Oct 8, 2014
4853554
#39 - Port the OAuth Bearer middleware from Katana.
Tratcher Oct 7, 2014
e9038b4
React to UsePerRequestServices
HaoK Oct 9, 2014
d598b83
Reacting to CLR package versioning changes
pranavkm Oct 10, 2014
9e2f992
Removing version from framework assemblies node
pranavkm Oct 10, 2014
2e65a40
Update Security to account for DataProtector API changes.
GrabYourPitchforks Oct 10, 2014
3e88f44
#69 - Properly delete Twitter state cookie.
Tratcher Oct 10, 2014
e315a54
#61 - Unit test cleanup.
Tratcher Oct 10, 2014
6965a66
#59 - Use Task.GetAwaiter().GetResult() instead of Task.Result.
Tratcher Oct 10, 2014
84dfcf5
React to Options and Hosting changes
HaoK Oct 15, 2014
45836c8
Update UseMiddleware dependencies.
Tratcher Oct 15, 2014
78f472f
Switch to automatically ensure request services
HaoK Oct 16, 2014
89ade80
Update Claims dependency.
Tratcher Oct 17, 2014
2c64ebd
Updating build.sh to work on Mono
pranavkm Oct 21, 2014
95f1940
#74 - Clean up data protection provider helper.
Tratcher Oct 21, 2014
a492b8f
#84 - Fix regression with OAuth Notifications.
Tratcher Oct 27, 2014
edefdf6
Updating Newtonsoft.json version to 6.0.6
pranavkm Oct 29, 2014
fb51830
Merge branch 'release' into dev
pranavkm Oct 29, 2014
2934bb8
Removing transitive dependencies from project.json
pranavkm Oct 29, 2014
a5bd9d2
Added package descriptions
davidfowl Oct 31, 2014
6aed946
Merge branch 'release' into dev
davidfowl Oct 31, 2014
32a967d
Updating to release NuGet.config
pranavkm Nov 6, 2014
842ccf1
Merge branch 'release' into dev
pranavkm Nov 6, 2014
ee16201
Update KProj to the latest format
Nov 12, 2014
0815681
Added kestrel to run samples on Mono
Nov 13, 2014
2f7c186
Adding necesary files for IIS hosting
Nov 13, 2014
4f90920
Added kestrel and running on IIS support
Nov 13, 2014
8709721
Merge branch 'UpdateKestrel' of https://github.com/aspnet/Security in…
Nov 14, 2014
0fee3c8
#85 - Update the targeted Facebook API version to v2.2.
Tratcher Nov 14, 2014
b37966f
Fix DataProtection DI dependencies.
Tratcher Nov 18, 2014
977a08d
Add DataProtection to samples.
Tratcher Nov 18, 2014
5f06906
React to fallback changes
HaoK Nov 21, 2014
240ed82
React to AddDataProtection change
HaoK Nov 25, 2014
0a71973
Add schema version to kproj files
Nov 25, 2014
184233a
#79: Remove cookie compression.
Tratcher Dec 5, 2014
23ce588
Updating to release NuGet.config
Dec 8, 2014
915d3a6
Updating to dev NuGet.config
Dec 8, 2014
20f21aa
Removing transitive dependencies from Microsoft.AspNet.Security.OAuth
pranavkm Dec 15, 2014
fcf2f93
Updating System.ObjectModel version that was copied incorrectly
pranavkm Dec 16, 2014
2d2eedf
Update tests to use official xunit
BrennanConroy Dec 15, 2014
8b7d33b
#63 - Use the PathBase in the Cookie path by default.
Tratcher Dec 18, 2014
fec32f6
#82 - Improve error handling mechanics.
Tratcher Nov 21, 2014
e6218c0
React to ReadFor breaking change.
Tratcher Jan 8, 2015
fbe80ee
Handle ReadFormAsync breaking changes.
Tratcher Jan 8, 2015
49e66f0
Additions for OpenIdConnectMiddleware and OAuthBearer Beta1.
brentschmaltz Jan 12, 2015
8e6e7f9
Fix directory casing, part1.
Tratcher Jan 14, 2015
9124224
Fix directory casing, part 2.
Tratcher Jan 14, 2015
38fb911
Clean up auth types, copywrite headers, file names, exceptions.
Tratcher Jan 14, 2015
61bdaec
Handle QueryBuilder namespace change.
Tratcher Jan 15, 2015
123e649
* Removing transitive dependencies from project.json
pranavkm Jan 15, 2015
f7c502a
Handle PipelineCore rename.
Tratcher Jan 15, 2015
4a63583
Initial iteration of new Authorization Service
HaoK Jan 16, 2015
de56109
Fixing Issue #120
tushargupta51 Jan 16, 2015
cdbd003
Adding token property to MessageReceivedNotification
tushargupta51 Jan 16, 2015
c53394e
Cleaning up comments and some TODOs.
tushargupta51 Jan 16, 2015
123065c
Add some sugar for AuthZ
HaoK Jan 18, 2015
ac03ad3
Handle HttpFeature rename
halter73 Jan 19, 2015
1f14d9a
Updating build.cmd and build.sh to use dotnetsdk
pranavkm Jan 20, 2015
de5c079
Updating NuGet.config
Jan 21, 2015
2319942
Rename SKIP_KRE_INSTALL to SKIP_DOTNET_INSTALL
ChengTian Jan 21, 2015
5328c7f
Change ASP.NET vNext to ASP.Net 5 in the Readme.md
Jan 21, 2015
4193fa2
Updating to release NuGet.config
Jan 21, 2015
0880dca
Merge branch 'release' into dev
Jan 21, 2015
d7b389e
Updating release NuGet.config to include AzureADNighty feed
pranavkm Jan 22, 2015
772d91a
Merge branch 'release' into dev
pranavkm Jan 22, 2015
e5518e6
ChallengeContext will be null with [Authorize] attribute
brentschmaltz Jan 27, 2015
e04358f
Missing resource file.
brentschmaltz Jan 27, 2015
3483842
Rollback of setting Principal on AuthenticationTicket.
brentschmaltz Jan 28, 2015
9743b59
Merge branch 'release' of github.com:aspnet/Security into release
ChengTian Jan 29, 2015
6367c0d
Update build.cmd and build.sh to use kvm
ChengTian Jan 29, 2015
24e68d8
Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL
ChengTian Jan 29, 2015
f9d3f6f
Fixing release NuGet.config
pranavkm Jan 30, 2015
a7c70cc
Merge branch 'release' into dev
pranavkm Jan 30, 2015
a249cbb
Merge pull request #137 from brentschmaltz/release
Jan 30, 2015
5acb421
Merge branch 'release' into dev
Jan 30, 2015
4e83a67
Creating authentication ticket by passing in a principal
Feb 2, 2015
260820e
Merge branch 'release' into dev
Feb 2, 2015
b17d718
Updating .kproj files
BrennanConroy Feb 4, 2015
710c2d7
Removing the AzureAD feed from security repo
Feb 5, 2015
47b786f
Merge branch 'release' into dev
Feb 5, 2015
74bb8e0
Reacting to System.Dynamic.Runtime version changes
pranavkm Feb 6, 2015
bb2352c
Remove build time deps and fixed formatting
davidfowl Feb 10, 2015
04c6b1f
Adding necessary dependencies to OpenIdConnect directly
Feb 10, 2015
58661b2
Add project.lock.json to .gitignore
ChengTian Feb 16, 2015
5094b85
Latest AuthZ iteration
HaoK Feb 16, 2015
a15cb4f
React to HttpRequest.IsSecure renaming
GrabYourPitchforks Feb 17, 2015
d864b72
React to DataProtection rename
GrabYourPitchforks Feb 26, 2015
775eb5e
Split Security into AuthN/AuthZ
HaoK Mar 2, 2015
d890f49
Fix sln and kproj
HaoK Mar 3, 2015
0577454
Fix for OpenIdConnect
HaoK Mar 3, 2015
329d826
Logging API changes
BrennanConroy Mar 5, 2015
5806642
React to DI changes
HaoK Mar 5, 2015
1459ca1
React to DI changes
HaoK Mar 5, 2015
e3b457b
Merge branch 'dev' of https://github.com/aspnet/Security into dev
BrennanConroy Mar 5, 2015
08017f9
Fix build breaks caused by Options refactoring.
GrabYourPitchforks Mar 5, 2015
e2bb762
Support AccessDeniedPath for Cookie 403 redirection
HaoK Mar 5, 2015
aacc00a
Move extension methods to proper namespaces
HaoK Mar 6, 2015
ce8caf0
Rename Microsoft.AspNet.Http.Interfaces => Microsoft.AspNet.Http
Mar 6, 2015
5e7f1d7
Add Configure overloads for Auth for config/name
HaoK Mar 6, 2015
1bd605d
Update aspnet50/aspnetcore50 => dnx451/dnxcore50.
Mar 8, 2015
dcaa515
Update K_BUILD_VERSION/kre/KRE/.k => DNX_BUILD_VERSION/dnx/DNX/.dnx.
Mar 8, 2015
56e3319
Update kvm/KVM/Kvm => dnvm/DNVM/Dnvm.
Mar 8, 2015
fb5bfb4
Update build.sh to use dnvm correctly.
Mar 8, 2015
08fdd7a
Remove BOM from project.json, *.cmd, *.sh and *.shade files.
Mar 9, 2015
b7c8af8
Reading AuthenticationProperties from SignOutContext
Mar 7, 2015
1ba9e04
Renaming Nuget.org feed key name to Nuget.
Mar 10, 2015
78406b4
Remove config from AddAuthorization
HaoK Mar 11, 2015
f8c526c
Update .kproj => .xproj.
Mar 11, 2015
36de6b9
Do not use deprecated `dnvm -x86` switch
dougbu Mar 11, 2015
eb73ad6
React to Caching package rename
Mar 12, 2015
42436d3
Update xunit.runner.kre => xunit.runner.aspnet.
BrennanConroy Mar 12, 2015
c4aa387
Temporarily skipping a couple of tests to work around Url encoder bug
Mar 13, 2015
bd7f070
Using [NotNull] from the common package
Mar 14, 2015
14d1b46
ClaimsXform and RIP AutoAuthHandler
HaoK Mar 16, 2015
7abccd8
React to Shared NotNull
HaoK Mar 16, 2015
e2a8efb
Cleanup
HaoK Mar 17, 2015
33e3c94
Reenabling the tests
Mar 18, 2015
6086bb0
Fixing the OpenIdConnect sample
Mar 18, 2015
776593e
React to hosting changes
HaoK Mar 19, 2015
aae2e63
Fix samples
HaoK Mar 19, 2015
4a5b9f6
Add a description for the OpenIdConnect package
Mar 24, 2015
3860951
Remove k command and use dnx instead
ChengTian Mar 25, 2015
fb87110
Updating to release NuGet.config
Mar 25, 2015
0037618
Merge branch 'release' into dev
Mar 25, 2015
101b719
Changing Wilson packages to beta4
Mar 31, 2015
ffd2489
Revert "Changing Wilson packages to beta4"
Mar 31, 2015
1a37bf1
Changing Wilson package versions to beta4
Mar 31, 2015
fcf083d
Merge branch 'release' into dev
Mar 31, 2015
5a6c908
Add travis and appveyor CI support.
Apr 1, 2015
e25ae01
Turn off sudo for .travis.yml.
Apr 2, 2015
568a48f
Update global.json, sources=>projects
troydai Apr 2, 2015
440e782
Update .xproj files for Microsoft.Web.AspNet.* -> Microsoft.DNX.* rename
dougbu Apr 2, 2015
8218a72
Correct .xproj filenames to match containing directories
dougbu Apr 2, 2015
3cd702d
Update solution to match renamed .xproj files
dougbu Apr 3, 2015
4eb9229
Merge remote-tracking branch 'origin/release' into dev
dougbu Apr 3, 2015
28a6ef1
Fix AppVeyor git line ending config
ChengTian Apr 4, 2015
e0694a2
Add serviceable attribute to projects.
Apr 7, 2015
7b5f418
Merge branch 'release' into dev
Apr 7, 2015
e44fb49
Update .travis.yml and appveyor.yml to build quietly.
Apr 7, 2015
4a2a742
Fix SecurityTokenValidated and rework the different OAuth2 Bearer mid…
kevinchalet Mar 3, 2015
5e03a6c
Fix incorrect handler delegation and update SignInScheme documentation
kevinchalet Mar 3, 2015
9ce84d3
React to http challenge changes
HaoK Apr 15, 2015
501bd4f
Merge https://github.com/brentschmaltz/Security
HaoK Apr 16, 2015
a3b2d2c
Handle Http.Core rename.
Tratcher Apr 16, 2015
99f3aa1
#118 - Use common cookie header formatters.
Tratcher Apr 13, 2015
7bc6cab
Fix samples
HaoK Apr 20, 2015
7d6349c
Fix samples.
Tratcher Apr 20, 2015
6072e3b
#221 Remove unneeded dependencies around DataProtection.
Tratcher Apr 21, 2015
30d350d
Move logger to base handler and moar var
HaoK Apr 22, 2015
87c31c5
Switch to IUrlEncoder, introduce AddAuthentication
HaoK Apr 24, 2015
63fc18b
React to auth feature API changes.
Tratcher Apr 24, 2015
1283414
React to Http.Interfaces package rename.
Tratcher Apr 29, 2015
4a5e8e5
Reacting to Logging Package rename
BrennanConroy Apr 30, 2015
5cf0564
Update LICENSE.txt and license header on files.
May 1, 2015
6e7ec9b
Cleanup cookies (moar var)
HaoK May 2, 2015
f864244
#242 Remove diagnostics sample dependency.
Tratcher May 5, 2015
ce48c1f
Move ClaimsIssuer to base AuthenticationOptions
HaoK May 5, 2015
434d158
Support custom name and role claims
HaoK May 6, 2015
dbdabeb
Delete old handlers
HaoK May 6, 2015
3cc6739
React to QueryString API change.
Tratcher May 6, 2015
e57440f
React to common package name change
troydai May 7, 2015
582f562
Using [NotNull] and 'nameof' operator
hishamco May 5, 2015
071de85
React to Http namespace changes.
Tratcher May 7, 2015
96a0b3e
Merge pull request #241 from hishamco/dev
Eilon May 9, 2015
75474fe
Update Home master -> Home dev
Eilon May 12, 2015
bb2e12a
Add sugar for UseClaimsTransformation
HaoK May 12, 2015
17deab1
AuthZ: Sugar to make resource parameter optional
HaoK May 12, 2015
538e1d6
Remove comments from project.json
troydai May 12, 2015
4688525
Tweak SecurityHelper.AddUserPrincipal logic
HaoK May 12, 2015
4ec8153
Reference to ASP.NET 5 instead of vNext in README
henkmollema May 13, 2015
f008483
Merge pull request #256 from henkmollema/patch-1
Eilon May 14, 2015
d89f5d0
Move comment into Startup.cs
troydai May 13, 2015
af2c524
React to aspnet/Configuration #195,#198
kirthik May 21, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ nuget.exe
*DS_Store
*.ncrunchsolution
*.*sdf
*.ipch
*.ipch
*.sln.ide
project.lock.json
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: csharp
sudo: false
script:
- ./build.sh --quiet verify
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Contributing
======

Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md) in the Home repo.
12 changes: 12 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Copyright (c) .NET Foundation. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
these files except in compliance with the License. You may obtain a copy of the
License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
8 changes: 1 addition & 7 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
<configuration>
<packageSources>
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/api/v2" />
<add key="NuGet.org" value="https://nuget.org/api/v2/" />
<add key="NuGet" value="https://nuget.org/api/v2/" />
</packageSources>
<packageSourceCredentials>
<AspNetVNext>
<add key="Username" value="aspnetreadonly" />
<add key="ClearTextPassword" value="4d8a2d9c-7b80-4162-9978-47e918c9658c" />
</AspNetVNext>
</packageSourceCredentials>
</configuration>
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ASP.NET Security
========

ASP.NET Security contains the security and authorization middlewares for ASP.NET 5.

This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the [Home](https://github.com/aspnet/home) repo.
285 changes: 236 additions & 49 deletions Security.sln

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
init:
- git config --global core.autocrlf true
build_script:
- build.cmd --quiet verify
clone_depth: 1
test: off
deploy: off
8 changes: 5 additions & 3 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ copy %CACHED_NUGET% .nuget\nuget.exe > nul
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion
CALL packages\KoreBuild\build\kvm upgrade -svr50 -x86
CALL packages\KoreBuild\build\kvm install default -svrc50 -x86

IF "%SKIP_DNX_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86

:run
CALL packages\KoreBuild\build\kvm use default -svr50 -x86
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*
23 changes: 16 additions & 7 deletions build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
#!/bin/sh
#!/bin/bash

if test `uname` = Darwin; then
cachedir=~/Library/Caches/KBuild
else
if x$XDG_DATA_HOME = x; then
cachedir=$HOME/.local/share
if [ -z $XDG_DATA_HOME ]; then
cachedir=$HOME/.local/share
else
cachedir=$XDG_DATA_HOME;
cachedir=$XDG_DATA_HOME;
fi
fi
mkdir -p $cachedir

url=https://www.nuget.org/nuget.exe

if test ! -f $cachedir/nuget.exe; then
wget -o $cachedir/nuget.exe $url 2>/dev/null || curl -o $cachedir/nuget.exe --location $url /dev/null
wget -O $cachedir/nuget.exe $url 2>/dev/null || curl -o $cachedir/nuget.exe --location $url /dev/null
fi

if test ! -e .nuget; then
mkdir .nuget
cp $cachedir/nuget.exe .nuget
cp $cachedir/nuget.exe .nuget/nuget.exe
fi

if test ! -d packages/KoreBuild; then
mono .nuget/nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
mono .nuget/nuget.exe install Sake -version 0.2 -o packages -ExcludeVersion
fi

mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@"
if ! type dnvm > /dev/null 2>&1; then
source packages/KoreBuild/build/dnvm.sh
fi

if ! type dnx > /dev/null 2>&1; then
dnvm upgrade
fi

mono packages/Sake/tools/Sake.exe -I packages/KoreBuild/build -f makefile.shade "$@"

4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"sources": ["src"]
}
"projects": ["src"]
}
2 changes: 1 addition & 1 deletion makefile.shade
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

var VERSION='0.1'
var FULL_VERSION='0.1'
var AUTHORS='Microsoft'
var AUTHORS='Microsoft Open Technologies, Inc.'

use-standard-lifecycle
k-standard-goals
26 changes: 0 additions & 26 deletions samples/CookieSample/CookieSample.kproj

This file was deleted.

18 changes: 18 additions & 0 deletions samples/CookieSample/CookieSample.xproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>558c2c2a-aed8-49de-bb60-d5f8ae06c714</ProjectGuid>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
<DevelopmentServerPort>22569</DevelopmentServerPort>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
21 changes: 21 additions & 0 deletions samples/CookieSample/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNET_ENV": "Development"
}
},
"web": {
"commandName": "web",
"launchBrowser": true,
"launchUrl": "http://localhost:12345"
},
"kestrel": {
"commandName": "kestrel",
"launchBrowser": true,
"launchUrl": "http://localhost:5004"
}
}
}
49 changes: 14 additions & 35 deletions samples/CookieSample/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
using System;
using System.Security.Claims;
using Microsoft.AspNet;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Security.Cookies;
using Microsoft.AspNet.RequestContainer;
using Microsoft.AspNet.Authentication.Cookies;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.DependencyInjection.Fallback;
using Microsoft.Framework.Logging;

namespace CookieSample
{
public class Startup
{
public void Configuration(IBuilder app)
public void ConfigureServices(IServiceCollection services)
{
app.UseServices(services =>
{
// TODO: Move to host.
services.AddInstance<ILoggerFactory>(new NullLoggerFactory());
});
services.AddAuthentication();
}

app.UseCookieAuthentication(new CookieAuthenticationOptions()
{
public void Configure(IApplicationBuilder app, ILoggerFactory loggerfactory)
{
loggerfactory.AddConsole(LogLevel.Information);

app.UseCookieAuthentication(options =>
{
options.AutomaticAuthentication = true;
});

app.Run(async context =>
{
if (context.User == null || !context.User.Identity.IsAuthenticated)
if (string.IsNullOrEmpty(context.User.Identity.Name))
{
context.Response.SignIn(new ClaimsIdentity(new[] { new Claim("name", "bob") }, CookieAuthenticationDefaults.AuthenticationType));

var user = new ClaimsPrincipal(new ClaimsIdentity(new[] { new Claim(ClaimTypes.Name, "bob") }));
context.Authentication.SignIn(CookieAuthenticationDefaults.AuthenticationScheme, user);
context.Response.ContentType = "text/plain";
await context.Response.WriteAsync("Hello First timer");
return;
Expand All @@ -41,23 +38,5 @@ public void Configuration(IBuilder app)
await context.Response.WriteAsync("Hello old timer");
});
}

// TODO: Temp workaround until the host reliably provides logging.
// If ILoggerFactory is never guaranteed, move this fallback into Microsoft.Framework.Logging.
private class NullLoggerFactory : ILoggerFactory
{
public ILogger Create(string name)
{
return new NullLongger();
}
}

private class NullLongger : ILogger
{
public bool WriteCore(TraceType eventType, int eventId, object state, Exception exception, Func<object, Exception, string> formatter)
{
return false;
}
}
}
}
55 changes: 19 additions & 36 deletions samples/CookieSample/project.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,21 @@
{
"version": "0.1-alpha-*",
"dependencies": {
"Microsoft.AspNet.Http": "0.1-alpha-*",
"Microsoft.AspNet.Security": "",
"Microsoft.AspNet.Security.Cookies": "",
"Microsoft.AspNet.Hosting": "0.1-alpha-*",
"Microsoft.AspNet.RequestContainer": "0.1-alpha-*",
"Microsoft.AspNet.PipelineCore": "0.1-alpha-*",
"Microsoft.AspNet.FeatureModel": "0.1-alpha-*",
"Microsoft.AspNet.HttpFeature": "0.1-alpha-*",
"Microsoft.AspNet.Server.WebListener": "0.1-alpha-*",
"Microsoft.Framework.DependencyInjection": "0.1-alpha-*",
"Microsoft.Framework.Logging": "0.1-alpha-*"
},
"commands": { "web": "Microsoft.AspNet.Hosting server.name=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:12345" },
"configurations": {
"net45": {
"dependencies": {
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-*",
"Microsoft.AspNet.DataProtection": "1.0.0-*",
"Microsoft.AspNet.Server.WebListener": "1.0.0-*",
"Microsoft.AspNet.Server.IIS": "1.0.0-*",
"Microsoft.Framework.Logging.Console": "1.0.0-*",
"Kestrel": "1.0.0-*"
},
"k10": {
"dependencies": {
"System.Console": "4.0.0.0",
"System.Collections": "4.0.0.0",
"System.Diagnostics.Debug": "4.0.10.0",
"System.Diagnostics.Tools": "4.0.0.0",
"System.Globalization": "4.0.10.0",
"System.IO": "4.0.0.0",
"System.Linq": "4.0.0.0",
"System.Reflection": "4.0.10.0",
"System.Resources.ResourceManager": "4.0.0.0",
"System.Runtime": "4.0.20.0",
"System.Runtime.Extensions": "4.0.10.0",
"System.Runtime.InteropServices": "4.0.20.0",
"System.Threading.Tasks": "4.0.10.0"
}
}
}
}
"commands": {
"web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:12345",
"kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004"
},
"frameworks": {
"dnx451": {
},
"dnxcore50": {
}
},
"webroot":"wwwroot"
}
Empty file.
18 changes: 18 additions & 0 deletions samples/CookieSessionSample/CookieSessionSample.xproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>19711880-46da-4a26-9e0f-9b2e41d27651</ProjectGuid>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
<DevelopmentServerPort>36505</DevelopmentServerPort>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
Loading