Browse files

updating gitattributes file

  • Loading branch information...
1 parent d1dfa17 commit 05589f8a82a0dc13ce62fee13c23396e806fbcd1 @shanselman committed Jan 28, 2013
View
22 .gitattributes
@@ -0,0 +1,22 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# Custom for Visual Studio
+*.cs diff=csharp
+*.sln merge=union
+*.csproj merge=union
+*.vbproj merge=union
+*.fsproj merge=union
+*.dbproj merge=union
+
+# Standard to msysgit
+*.doc diff=astextplain
+*.DOC diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot diff=astextplain
+*.DOT diff=astextplain
+*.pdf diff=astextplain
+*.PDF diff=astextplain
+*.rtf diff=astextplain
+*.RTF diff=astextplain
View
14 .gitignore
@@ -1,8 +1,8 @@
-# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
-bin
-obj
-Packages
-*.suo
-
-# mstest test results
+# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
+bin
+obj
+Packages
+*.suo
+
+# mstest test results
TestResults
View
10 MVC4/.nuget/NuGet.Config
@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
- <solution>
- <add key="disableSourceControlIntegration" value="true" />
- </solution>
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <solution>
+ <add key="disableSourceControlIntegration" value="true" />
+ </solution>
</configuration>
View
304 MVC4/.nuget/NuGet.targets
@@ -1,153 +1,153 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
-
- <!-- Enable the restore command to run before builds -->
- <RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
-
- <!-- Property that enables building a package from a project -->
- <BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
-
- <!-- Determines if package restore consent is required to restore packages -->
- <RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
-
- <!-- Download NuGet.exe if it does not already exist -->
- <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
- </PropertyGroup>
-
- <ItemGroup Condition=" '$(PackageSources)' == '' ">
- <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
- <!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
- <!--
- <PackageSource Include="https://nuget.org/api/v2/" />
- <PackageSource Include="https://my-nuget-source/nuget/" />
- -->
- </ItemGroup>
-
- <PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
- <!-- Windows specific commands -->
- <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
- <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
- <PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
- </PropertyGroup>
-
- <PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
- <!-- We need to launch nuget.exe with the mono command if we're not on windows -->
- <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
- <PackagesConfig>packages.config</PackagesConfig>
- <PackagesDir>$(SolutionDir)packages</PackagesDir>
- </PropertyGroup>
-
- <PropertyGroup>
- <!-- NuGet command -->
- <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
- <PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
-
- <NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
- <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
-
- <PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
-
- <RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
- <!-- Commands -->
- <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)"</RestoreCommand>
- <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
-
- <!-- We need to ensure packages are restored prior to assembly resolve -->
- <ResolveReferencesDependsOn Condition="$(RestorePackages) == 'true'">
- RestorePackages;
- $(ResolveReferencesDependsOn);
- </ResolveReferencesDependsOn>
-
- <!-- Make the build depend on restore packages -->
- <BuildDependsOn Condition="$(BuildPackage) == 'true'">
- $(BuildDependsOn);
- BuildPackage;
- </BuildDependsOn>
- </PropertyGroup>
-
- <Target Name="CheckPrerequisites">
- <!-- Raise an error if we're unable to locate nuget.exe -->
- <Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
- <SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
- <!--
- Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
- This effectively acts as a lock that makes sure that the download operation will only happen once and all
- parallel builds will have to wait for it to complete.
- -->
- <MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT" />
- </Target>
-
- <Target Name="_DownloadNuGet">
- <DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
- </Target>
-
- <Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
- <Exec Command="$(RestoreCommand)"
- Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
-
- <Exec Command="$(RestoreCommand)"
- LogStandardErrorAsError="true"
- Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
- </Target>
-
- <Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
- <Exec Command="$(BuildCommand)"
- Condition=" '$(OS)' != 'Windows_NT' " />
-
- <Exec Command="$(BuildCommand)"
- LogStandardErrorAsError="true"
- Condition=" '$(OS)' == 'Windows_NT' " />
- </Target>
-
- <UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
- <ParameterGroup>
- <OutputFilename ParameterType="System.String" Required="true" />
- </ParameterGroup>
- <Task>
- <Reference Include="System.Core" />
- <Using Namespace="System" />
- <Using Namespace="System.IO" />
- <Using Namespace="System.Net" />
- <Using Namespace="Microsoft.Build.Framework" />
- <Using Namespace="Microsoft.Build.Utilities" />
- <Code Type="Fragment" Language="cs">
- <![CDATA[
- try {
- OutputFilename = Path.GetFullPath(OutputFilename);
-
- Log.LogMessage("Downloading latest version of NuGet.exe...");
- WebClient webClient = new WebClient();
- webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
-
- return true;
- }
- catch (Exception ex) {
- Log.LogErrorFromException(ex);
- return false;
- }
- ]]>
- </Code>
- </Task>
- </UsingTask>
-
- <UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
- <ParameterGroup>
- <EnvKey ParameterType="System.String" Required="true" />
- <EnvValue ParameterType="System.String" Required="true" />
- </ParameterGroup>
- <Task>
- <Using Namespace="System" />
- <Code Type="Fragment" Language="cs">
- <![CDATA[
- try {
- Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
- }
- catch {
- }
- ]]>
- </Code>
- </Task>
- </UsingTask>
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
+
+ <!-- Enable the restore command to run before builds -->
+ <RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
+
+ <!-- Property that enables building a package from a project -->
+ <BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
+
+ <!-- Determines if package restore consent is required to restore packages -->
+ <RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
+
+ <!-- Download NuGet.exe if it does not already exist -->
+ <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
+ </PropertyGroup>
+
+ <ItemGroup Condition=" '$(PackageSources)' == '' ">
+ <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
+ <!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
+ <!--
+ <PackageSource Include="https://nuget.org/api/v2/" />
+ <PackageSource Include="https://my-nuget-source/nuget/" />
+ -->
+ </ItemGroup>
+
+ <PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
+ <!-- Windows specific commands -->
+ <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
+ <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
+ <PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
+ <!-- We need to launch nuget.exe with the mono command if we're not on windows -->
+ <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
+ <PackagesConfig>packages.config</PackagesConfig>
+ <PackagesDir>$(SolutionDir)packages</PackagesDir>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- NuGet command -->
+ <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
+ <PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
+
+ <NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
+ <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
+
+ <PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
+
+ <RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
+ <!-- Commands -->
+ <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)"</RestoreCommand>
+ <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
+
+ <!-- We need to ensure packages are restored prior to assembly resolve -->
+ <ResolveReferencesDependsOn Condition="$(RestorePackages) == 'true'">
+ RestorePackages;
+ $(ResolveReferencesDependsOn);
+ </ResolveReferencesDependsOn>
+
+ <!-- Make the build depend on restore packages -->
+ <BuildDependsOn Condition="$(BuildPackage) == 'true'">
+ $(BuildDependsOn);
+ BuildPackage;
+ </BuildDependsOn>
+ </PropertyGroup>
+
+ <Target Name="CheckPrerequisites">
+ <!-- Raise an error if we're unable to locate nuget.exe -->
+ <Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
+ <SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
+ <!--
+ Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
+ This effectively acts as a lock that makes sure that the download operation will only happen once and all
+ parallel builds will have to wait for it to complete.
+ -->
+ <MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT" />
+ </Target>
+
+ <Target Name="_DownloadNuGet">
+ <DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
+ </Target>
+
+ <Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(RestoreCommand)"
+ Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
+
+ <Exec Command="$(RestoreCommand)"
+ LogStandardErrorAsError="true"
+ Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
+ </Target>
+
+ <Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(BuildCommand)"
+ Condition=" '$(OS)' != 'Windows_NT' " />
+
+ <Exec Command="$(BuildCommand)"
+ LogStandardErrorAsError="true"
+ Condition=" '$(OS)' == 'Windows_NT' " />
+ </Target>
+
+ <UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <OutputFilename ParameterType="System.String" Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Reference Include="System.Core" />
+ <Using Namespace="System" />
+ <Using Namespace="System.IO" />
+ <Using Namespace="System.Net" />
+ <Using Namespace="Microsoft.Build.Framework" />
+ <Using Namespace="Microsoft.Build.Utilities" />
+ <Code Type="Fragment" Language="cs">
+ <![CDATA[
+ try {
+ OutputFilename = Path.GetFullPath(OutputFilename);
+
+ Log.LogMessage("Downloading latest version of NuGet.exe...");
+ WebClient webClient = new WebClient();
+ webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
+
+ return true;
+ }
+ catch (Exception ex) {
+ Log.LogErrorFromException(ex);
+ return false;
+ }
+ ]]>
+ </Code>
+ </Task>
+ </UsingTask>
+
+ <UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <EnvKey ParameterType="System.String" Required="true" />
+ <EnvValue ParameterType="System.String" Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Using Namespace="System" />
+ <Code Type="Fragment" Language="cs">
+ <![CDATA[
+ try {
+ Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
+ }
+ catch {
+ }
+ ]]>
+ </Code>
+ </Task>
+ </UsingTask>
</Project>
View
54 MVC4/PersonaMVC4Example.sln
@@ -1,27 +1,27 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonaMVC4Example", "PersonaMVC4Example\PersonaMVC4Example.csproj", "{38A68603-BC0F-4955-A4BD-B9E14BC72A0F}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B561F3F7-F8ED-409C-A4A5-9A4DAE48DC1B}"
- ProjectSection(SolutionItems) = preProject
- .nuget\NuGet.Config = .nuget\NuGet.Config
- .nuget\NuGet.exe = .nuget\NuGet.exe
- .nuget\NuGet.targets = .nuget\NuGet.targets
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonaMVC4Example", "PersonaMVC4Example\PersonaMVC4Example.csproj", "{38A68603-BC0F-4955-A4BD-B9E14BC72A0F}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B561F3F7-F8ED-409C-A4A5-9A4DAE48DC1B}"
+ ProjectSection(SolutionItems) = preProject
+ .nuget\NuGet.Config = .nuget\NuGet.Config
+ .nuget\NuGet.exe = .nuget\NuGet.exe
+ .nuget\NuGet.targets = .nuget\NuGet.targets
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {38A68603-BC0F-4955-A4BD-B9E14BC72A0F}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
View
66 MVC4/PersonaMVC4Example/App_Start/AuthConfig.cs
@@ -1,33 +1,33 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.Web.WebPages.OAuth;
-using PersonaMVC4Example.Models;
-
-namespace PersonaMVC4Example
-{
- public static class AuthConfig
- {
- public static void RegisterAuth()
- {
- // To let users of this site log in using their accounts from other sites such as Microsoft, Facebook, and Twitter,
- // you must update this site. For more information visit http://go.microsoft.com/fwlink/?LinkID=252166
- OAuthWebSecurity.RegisterClient(new PersonaAuthenticationClient(), "Persona", null);
-
- //OAuthWebSecurity.RegisterMicrosoftClient(
- // clientId: "",
- // clientSecret: "");
-
- //OAuthWebSecurity.RegisterTwitterClient(
- // consumerKey: "",
- // consumerSecret: "");
-
- //OAuthWebSecurity.RegisterFacebookClient(
- // appId: "",
- // appSecret: "");
-
- OAuthWebSecurity.RegisterGoogleClient();
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Web.WebPages.OAuth;
+using PersonaMVC4Example.Models;
+
+namespace PersonaMVC4Example
+{
+ public static class AuthConfig
+ {
+ public static void RegisterAuth()
+ {
+ // To let users of this site log in using their accounts from other sites such as Microsoft, Facebook, and Twitter,
+ // you must update this site. For more information visit http://go.microsoft.com/fwlink/?LinkID=252166
+ OAuthWebSecurity.RegisterClient(new PersonaAuthenticationClient(), "Persona", null);
+
+ //OAuthWebSecurity.RegisterMicrosoftClient(
+ // clientId: "",
+ // clientSecret: "");
+
+ //OAuthWebSecurity.RegisterTwitterClient(
+ // consumerKey: "",
+ // consumerSecret: "");
+
+ //OAuthWebSecurity.RegisterFacebookClient(
+ // appId: "",
+ // appSecret: "");
+
+ OAuthWebSecurity.RegisterGoogleClient();
+ }
+ }
+}
View
180 MVC4/PersonaMVC4Example/Controllers/PersonaController.cs
@@ -1,90 +1,90 @@
-using Microsoft.Web.WebPages.OAuth;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using PersonaMVC4Example.Models;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Net.Http;
-using System.Threading.Tasks;
-using System.Web;
-using System.Web.Http;
-using System.Web.Security;
-using WebMatrix.WebData;
-
-namespace PersonaMVC4Example.Controllers
-{
- [SimplePostVariableParameterBinding]
- public class PersonaController : ApiController
- {
- // POST api/persona
- [HttpPost][ActionName("login")]
- public async Task<HttpResponseMessage> Login(string assertion)
- {
- if (assertion == null)
- {
- return new HttpResponseMessage(HttpStatusCode.BadRequest);
- }
- var cookies = Request.Headers.GetCookies();
- string token = cookies[0]["__RequestVerificationToken"].Value;
- //TODO What do I do with this?
-
- using (var client = new HttpClient())
- {
- var content = new FormUrlEncodedContent(
- new Dictionary<string, string> {
- { "assertion", assertion },
- { "audience", Request.Url.Host },
- }
- );
- var result = await client.PostAsync("https://verifier.login.persona.org/verify", content);
- var stringresult = await result.Content.ReadAsStringAsync();
- dynamic jsonresult = JsonConvert.DeserializeObject<dynamic>(stringresult);
- if (jsonresult.status == "okay")
- {
- string email = jsonresult.email;
-
- string userName = null;
- if (User.Identity.IsAuthenticated)
- {
- userName = User.Identity.Name;
- }
- else
- {
- userName = OAuthWebSecurity.GetUserName("Persona", email);
- if (userName == null)
- {
- userName = email; // TODO: prompt for user name
- using (UsersContext db = new UsersContext())
- {
- UserProfile user = db.UserProfiles.FirstOrDefault(u => u.UserName.ToLower() == userName.ToLower());
- // Check if user already exists
- if (user == null)
- {
- // Insert name into the profile table
- db.UserProfiles.Add(new UserProfile { UserName = userName });
- db.SaveChanges();
-
- }
- }
- }
- }
-
- OAuthWebSecurity.CreateOrUpdateAccount("Persona", email, userName);
-
-
- FormsAuthentication.SetAuthCookie(email, false);
- return new HttpResponseMessage(HttpStatusCode.OK);
- }
- }
- return new HttpResponseMessage(HttpStatusCode.Forbidden);
- }
-
- [HttpPost][ActionName("logout")]
- public void Logout()
- {
- WebSecurity.Logout();
- }
- }
-}
+using Microsoft.Web.WebPages.OAuth;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using PersonaMVC4Example.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Threading.Tasks;
+using System.Web;
+using System.Web.Http;
+using System.Web.Security;
+using WebMatrix.WebData;
+
+namespace PersonaMVC4Example.Controllers
+{
+ [SimplePostVariableParameterBinding]
+ public class PersonaController : ApiController
+ {
+ // POST api/persona
+ [HttpPost][ActionName("login")]
+ public async Task<HttpResponseMessage> Login(string assertion)
+ {
+ if (assertion == null)
+ {
+ return new HttpResponseMessage(HttpStatusCode.BadRequest);
+ }
+ var cookies = Request.Headers.GetCookies();
+ string token = cookies[0]["__RequestVerificationToken"].Value;
+ //TODO What do I do with this?
+
+ using (var client = new HttpClient())
+ {
+ var content = new FormUrlEncodedContent(
+ new Dictionary<string, string> {
+ { "assertion", assertion },
+ { "audience", Request.Url.Host },
+ }
+ );
+ var result = await client.PostAsync("https://verifier.login.persona.org/verify", content);
+ var stringresult = await result.Content.ReadAsStringAsync();
+ dynamic jsonresult = JsonConvert.DeserializeObject<dynamic>(stringresult);
+ if (jsonresult.status == "okay")
+ {
+ string email = jsonresult.email;
+
+ string userName = null;
+ if (User.Identity.IsAuthenticated)
+ {
+ userName = User.Identity.Name;
+ }
+ else
+ {
+ userName = OAuthWebSecurity.GetUserName("Persona", email);
+ if (userName == null)
+ {
+ userName = email; // TODO: prompt for user name
+ using (UsersContext db = new UsersContext())
+ {
+ UserProfile user = db.UserProfiles.FirstOrDefault(u => u.UserName.ToLower() == userName.ToLower());
+ // Check if user already exists
+ if (user == null)
+ {
+ // Insert name into the profile table
+ db.UserProfiles.Add(new UserProfile { UserName = userName });
+ db.SaveChanges();
+
+ }
+ }
+ }
+ }
+
+ OAuthWebSecurity.CreateOrUpdateAccount("Persona", email, userName);
+
+
+ FormsAuthentication.SetAuthCookie(email, false);
+ return new HttpResponseMessage(HttpStatusCode.OK);
+ }
+ }
+ return new HttpResponseMessage(HttpStatusCode.Forbidden);
+ }
+
+ [HttpPost][ActionName("logout")]
+ public void Logout()
+ {
+ WebSecurity.Logout();
+ }
+ }
+}
View
50 MVC4/PersonaMVC4Example/Helpers/PersonaAuthenticationClient.cs
@@ -1,26 +1,26 @@
-using DotNetOpenAuth.AspNet;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-
-namespace PersonaMVC4Example
-{
- public class PersonaAuthenticationClient : IAuthenticationClient
- {
- public string ProviderName
- {
- get { return "Persona"; }
- }
-
- public void RequestAuthentication(HttpContextBase context, Uri returnUrl)
- {
- throw new NotImplementedException();
- }
-
- public AuthenticationResult VerifyAuthentication(HttpContextBase context)
- {
- throw new NotImplementedException();
- }
- }
+using DotNetOpenAuth.AspNet;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace PersonaMVC4Example
+{
+ public class PersonaAuthenticationClient : IAuthenticationClient
+ {
+ public string ProviderName
+ {
+ get { return "Persona"; }
+ }
+
+ public void RequestAuthentication(HttpContextBase context, Uri returnUrl)
+ {
+ throw new NotImplementedException();
+ }
+
+ public AuthenticationResult VerifyAuthentication(HttpContextBase context)
+ {
+ throw new NotImplementedException();
+ }
+ }
}
View
666 MVC4/PersonaMVC4Example/PersonaMVC4Example.csproj
@@ -1,334 +1,334 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>
- </ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{38A68603-BC0F-4955-A4BD-B9E14BC72A0F}</ProjectGuid>
- <ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>PersonaMVC4Example</RootNamespace>
- <AssemblyName>PersonaMVC4Example</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <MvcBuildViews>false</MvcBuildViews>
- <UseIISExpress>true</UseIISExpress>
- <IISExpressSSLPort />
- <IISExpressAnonymousAuthentication />
- <IISExpressWindowsAuthentication />
- <IISExpressUseClassicPipelineMode />
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
- <RestorePackages>true</RestorePackages>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Data.Entity" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Web.DynamicData" />
- <Reference Include="System.Web.Entity" />
- <Reference Include="System.Web.ApplicationServices" />
- <Reference Include="System.ComponentModel.DataAnnotations" />
- <Reference Include="System.Core" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Web" />
- <Reference Include="System.Web.Extensions" />
- <Reference Include="System.Web.Abstractions" />
- <Reference Include="System.Web.Routing" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Configuration" />
- <Reference Include="System.Transactions" />
- <Reference Include="System.Web.Services" />
- <Reference Include="System.EnterpriseServices" />
- <Reference Include="EntityFramework">
- <HintPath>..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
- </Reference>
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\packages\Newtonsoft.Json.4.5.6\lib\net40\Newtonsoft.Json.dll</HintPath>
- </Reference>
- <Reference Include="System.Net.Http">
- </Reference>
- <Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\packages\Microsoft.AspNet.WebApi.Client.4.0.20710.0\lib\net40\System.Net.Http.Formatting.dll</HintPath>
- </Reference>
- <Reference Include="System.Net.Http.WebRequest">
- </Reference>
- <Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\packages\Microsoft.AspNet.WebApi.Core.4.0.20710.0\lib\net40\System.Web.Http.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.4.0.20710.0\lib\net40\System.Web.Http.WebHost.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.Optimization">
- <HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.0.0\lib\net40\System.Web.Optimization.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
- </Reference>
- <Reference Include="WebMatrix.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\Microsoft.AspNet.WebPages.Data.2.0.20710.0\lib\net40\WebMatrix.Data.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Web.WebPages.OAuth, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\Microsoft.AspNet.WebPages.OAuth.2.0.20710.0\lib\net40\Microsoft.Web.WebPages.OAuth.dll</HintPath>
- </Reference>
- <Reference Include="WebMatrix.WebData, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\Microsoft.AspNet.WebPages.WebData.2.0.20710.0\lib\net40\WebMatrix.WebData.dll</HintPath>
- </Reference>
- <Reference Include="DotNetOpenAuth.AspNet, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\DotNetOpenAuth.AspNet.4.0.3.12153\lib\net40-full\DotNetOpenAuth.AspNet.dll</HintPath>
- </Reference>
- <Reference Include="DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\DotNetOpenAuth.Core.4.0.3.12153\lib\net40-full\DotNetOpenAuth.Core.dll</HintPath>
- </Reference>
- <Reference Include="DotNetOpenAuth.OAuth.Consumer, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\DotNetOpenAuth.OAuth.Consumer.4.0.3.12153\lib\net40-full\DotNetOpenAuth.OAuth.Consumer.dll</HintPath>
- </Reference>
- <Reference Include="DotNetOpenAuth.OAuth, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\DotNetOpenAuth.OAuth.Core.4.0.3.12153\lib\net40-full\DotNetOpenAuth.OAuth.dll</HintPath>
- </Reference>
- <Reference Include="DotNetOpenAuth.OpenId, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\DotNetOpenAuth.OpenId.Core.4.0.3.12153\lib\net40-full\DotNetOpenAuth.OpenId.dll</HintPath>
- </Reference>
- <Reference Include="DotNetOpenAuth.OpenId.RelyingParty, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\packages\DotNetOpenAuth.OpenId.RelyingParty.4.0.3.12153\lib\net40-full\DotNetOpenAuth.OpenId.RelyingParty.dll</HintPath>
- </Reference>
- <Reference Include="WebGrease">
- <Private>True</Private>
- <HintPath>..\packages\WebGrease.1.1.0\lib\WebGrease.dll</HintPath>
- </Reference>
- <Reference Include="Antlr3.Runtime">
- <Private>True</Private>
- <HintPath>..\packages\WebGrease.1.1.0\lib\Antlr3.Runtime.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="App_Start\AuthConfig.cs" />
- <Compile Include="App_Start\BundleConfig.cs" />
- <Compile Include="App_Start\FilterConfig.cs" />
- <Compile Include="App_Start\RouteConfig.cs" />
- <Compile Include="App_Start\WebApiConfig.cs" />
- <Compile Include="Controllers\AccountController.cs" />
- <Compile Include="Controllers\HomeController.cs" />
- <Compile Include="Controllers\PersonaController.cs" />
- <Compile Include="Filters\InitializeSimpleMembershipAttribute.cs" />
- <Compile Include="Global.asax.cs">
- <DependentUpon>Global.asax</DependentUpon>
- </Compile>
- <Compile Include="Helpers\PersonaAuthenticationClient.cs" />
- <Compile Include="ModelBinders\SimplePostVariableParameterBinding.cs" />
- <Compile Include="ModelBinders\SimplePostVariableParameterBindingAttribute.cs" />
- <Compile Include="Models\AccountModels.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="Content\persona-buttons.css" />
- <Content Include="Content\themes\base\images\ui-bg_flat_0_aaaaaa_40x100.png" />
- <Content Include="Content\themes\base\images\ui-bg_flat_75_ffffff_40x100.png" />
- <Content Include="Content\themes\base\images\ui-bg_glass_55_fbf9ee_1x400.png" />
- <Content Include="Content\themes\base\images\ui-bg_glass_65_ffffff_1x400.png" />
- <Content Include="Content\themes\base\images\ui-bg_glass_75_dadada_1x400.png" />
- <Content Include="Content\themes\base\images\ui-bg_glass_75_e6e6e6_1x400.png" />
- <Content Include="Content\themes\base\images\ui-bg_glass_95_fef1ec_1x400.png" />
- <Content Include="Content\themes\base\images\ui-bg_highlight-soft_75_cccccc_1x100.png" />
- <Content Include="Content\themes\base\images\ui-icons_222222_256x240.png" />
- <Content Include="Content\themes\base\images\ui-icons_2e83ff_256x240.png" />
- <Content Include="Content\themes\base\images\ui-icons_454545_256x240.png" />
- <Content Include="Content\themes\base\images\ui-icons_888888_256x240.png" />
- <Content Include="Content\themes\base\images\ui-icons_cd0a0a_256x240.png" />
- <Content Include="Content\themes\base\jquery-ui.css" />
- <Content Include="Content\themes\base\jquery.ui.accordion.css" />
- <Content Include="Content\themes\base\jquery.ui.all.css" />
- <Content Include="Content\themes\base\jquery.ui.autocomplete.css" />
- <Content Include="Content\themes\base\jquery.ui.base.css" />
- <Content Include="Content\themes\base\jquery.ui.button.css" />
- <Content Include="Content\themes\base\jquery.ui.core.css" />
- <Content Include="Content\themes\base\jquery.ui.datepicker.css" />
- <Content Include="Content\themes\base\jquery.ui.dialog.css" />
- <Content Include="Content\themes\base\jquery.ui.progressbar.css" />
- <Content Include="Content\themes\base\jquery.ui.resizable.css" />
- <Content Include="Content\themes\base\jquery.ui.selectable.css" />
- <Content Include="Content\themes\base\jquery.ui.slider.css" />
- <Content Include="Content\themes\base\jquery.ui.tabs.css" />
- <Content Include="Content\themes\base\jquery.ui.theme.css" />
- <Content Include="Content\themes\base\minified\images\ui-bg_flat_0_aaaaaa_40x100.png" />
- <Content Include="Content\themes\base\minified\images\ui-bg_flat_75_ffffff_40x100.png" />
- <Content Include="Content\themes\base\minified\images\ui-bg_glass_55_fbf9ee_1x400.png" />
- <Content Include="Content\themes\base\minified\images\ui-bg_glass_65_ffffff_1x400.png" />
- <Content Include="Content\themes\base\minified\images\ui-bg_glass_75_dadada_1x400.png" />
- <Content Include="Content\themes\base\minified\images\ui-bg_glass_75_e6e6e6_1x400.png" />
- <Content Include="Content\themes\base\minified\images\ui-bg_glass_95_fef1ec_1x400.png" />
- <Content Include="Content\themes\base\minified\images\ui-bg_highlight-soft_75_cccccc_1x100.png" />
- <Content Include="Content\themes\base\minified\images\ui-icons_222222_256x240.png" />
- <Content Include="Content\themes\base\minified\images\ui-icons_2e83ff_256x240.png" />
- <Content Include="Content\themes\base\minified\images\ui-icons_454545_256x240.png" />
- <Content Include="Content\themes\base\minified\images\ui-icons_888888_256x240.png" />
- <Content Include="Content\themes\base\minified\images\ui-icons_cd0a0a_256x240.png" />
- <Content Include="Content\themes\base\minified\jquery-ui.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.accordion.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.autocomplete.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.button.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.core.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.datepicker.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.dialog.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.progressbar.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.resizable.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.selectable.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.slider.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.tabs.min.css" />
- <Content Include="Content\themes\base\minified\jquery.ui.theme.min.css" />
- <Content Include="favicon.ico" />
- <Content Include="Global.asax" />
- <None Include="Scripts\jquery-1.7.1.intellisense.js" />
- <Content Include="Images\personasinginbutton.png" />
- <Content Include="Scripts\jquery-1.7.1.js" />
- <Content Include="Scripts\jquery-1.7.1.min.js" />
- <None Include="Scripts\jquery.validate-vsdoc.js" />
- <Content Include="Scripts\jquery-ui-1.8.20.js" />
- <Content Include="Scripts\jquery-ui-1.8.20.min.js" />
- <Content Include="Scripts\jquery.unobtrusive-ajax.js" />
- <Content Include="Scripts\jquery.unobtrusive-ajax.min.js" />
- <Content Include="Scripts\jquery.validate.js" />
- <Content Include="Scripts\jquery.validate.min.js" />
- <Content Include="Scripts\jquery.validate.unobtrusive.js" />
- <Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
- <Content Include="Scripts\knockout-2.1.0.debug.js" />
- <Content Include="Scripts\knockout-2.1.0.js" />
- <Content Include="Scripts\modernizr-2.5.3.js" />
- <Content Include="Web.config" />
- <Content Include="Web.Debug.config">
- <DependentUpon>Web.config</DependentUpon>
- </Content>
- <Content Include="Web.Release.config">
- <DependentUpon>Web.config</DependentUpon>
- </Content>
- <Content Include="Content\Site.css" />
- <Content Include="Scripts\_references.js" />
- <Content Include="Images\accent.png" />
- <Content Include="Images\bullet.png" />
- <Content Include="Images\heroAccent.png" />
- <Content Include="Images\orderedList0.png" />
- <Content Include="Images\orderedList1.png" />
- <Content Include="Images\orderedList2.png" />
- <Content Include="Images\orderedList3.png" />
- <Content Include="Images\orderedList4.png" />
- <Content Include="Images\orderedList5.png" />
- <Content Include="Images\orderedList6.png" />
- <Content Include="Images\orderedList7.png" />
- <Content Include="Images\orderedList8.png" />
- <Content Include="Images\orderedList9.png" />
- <Content Include="Views\_ViewStart.cshtml" />
- <Content Include="Views\Account\_ChangePasswordPartial.cshtml" />
- <Content Include="Views\Account\_ExternalLoginsListPartial.cshtml" />
- <Content Include="Views\Account\_RemoveExternalLoginsPartial.cshtml" />
- <Content Include="Views\Account\_SetPasswordPartial.cshtml" />
- <Content Include="Views\Account\Login.cshtml" />
- <Content Include="Views\Account\Manage.cshtml" />
- <Content Include="Views\Account\Register.cshtml" />
- <Content Include="Views\Account\ExternalLoginFailure.cshtml" />
- <Content Include="Views\Account\ExternalLoginConfirmation.cshtml" />
- <Content Include="Views\Home\About.cshtml" />
- <Content Include="Views\Home\Contact.cshtml" />
- <Content Include="Views\Home\Index.cshtml" />
- <Content Include="Views\Shared\Error.cshtml" />
- <Content Include="Views\Shared\_LoginPartial.cshtml" />
- <Content Include="Views\Shared\_Layout.cshtml" />
- <Content Include="Views\Web.config" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="App_Data\" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="packages.config" />
- </ItemGroup>
- <PropertyGroup>
- <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
- <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
- <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
- <AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
- </Target>
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
- <WebProjectProperties>
- <UseIIS>True</UseIIS>
- <AutoAssignPort>True</AutoAssignPort>
- <DevelopmentServerPort>0</DevelopmentServerPort>
- <DevelopmentServerVPath>/</DevelopmentServerVPath>
- <IISUrl>http://localhost:6738/</IISUrl>
- <NTLMAuthentication>False</NTLMAuthentication>
- <UseCustomServer>False</UseCustomServer>
- <CustomServerUrl>
- </CustomServerUrl>
- <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
- </WebProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target> -->
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>
+ </ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{38A68603-BC0F-4955-A4BD-B9E14BC72A0F}</ProjectGuid>
+ <ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>PersonaMVC4Example</RootNamespace>
+ <AssemblyName>PersonaMVC4Example</AssemblyName>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <MvcBuildViews>false</MvcBuildViews>
+ <UseIISExpress>true</UseIISExpress>
+ <IISExpressSSLPort />
+ <IISExpressAnonymousAuthentication />
+ <IISExpressWindowsAuthentication />
+ <IISExpressUseClassicPipelineMode />
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Data.Entity" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Web.DynamicData" />
+ <Reference Include="System.Web.Entity" />
+ <Reference Include="System.Web.ApplicationServices" />
+ <Reference Include="System.ComponentModel.DataAnnotations" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Web.Extensions" />
+ <Reference Include="System.Web.Abstractions" />
+ <Reference Include="System.Web.Routing" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Configuration" />
+ <Reference Include="System.Transactions" />
+ <Reference Include="System.Web.Services" />
+ <Reference Include="System.EnterpriseServices" />
+ <Reference Include="EntityFramework">
+ <HintPath>..\packages\EntityFramework.5.0.0\lib\net45\EntityFramework.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
+ </Reference>
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>..\packages\Newtonsoft.Json.4.5.6\lib\net40\Newtonsoft.Json.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Net.Http">
+ </Reference>
+ <Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\packages\Microsoft.AspNet.WebApi.Client.4.0.20710.0\lib\net40\System.Net.Http.Formatting.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Net.Http.WebRequest">
+ </Reference>
+ <Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\packages\Microsoft.AspNet.WebApi.Core.4.0.20710.0\lib\net40\System.Web.Http.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.4.0.20710.0\lib\net40\System.Web.Http.WebHost.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\Microsoft.AspNet.Mvc.4.0.20710.0\lib\net40\System.Web.Mvc.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.Optimization">
+ <HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.0.0\lib\net40\System.Web.Optimization.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Deployment.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
+ </Reference>
+ <Reference Include="WebMatrix.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\Microsoft.AspNet.WebPages.Data.2.0.20710.0\lib\net40\WebMatrix.Data.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Web.WebPages.OAuth, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\Microsoft.AspNet.WebPages.OAuth.2.0.20710.0\lib\net40\Microsoft.Web.WebPages.OAuth.dll</HintPath>
+ </Reference>
+ <Reference Include="WebMatrix.WebData, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\Microsoft.AspNet.WebPages.WebData.2.0.20710.0\lib\net40\WebMatrix.WebData.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.AspNet, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\DotNetOpenAuth.AspNet.4.0.3.12153\lib\net40-full\DotNetOpenAuth.AspNet.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\DotNetOpenAuth.Core.4.0.3.12153\lib\net40-full\DotNetOpenAuth.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OAuth.Consumer, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\DotNetOpenAuth.OAuth.Consumer.4.0.3.12153\lib\net40-full\DotNetOpenAuth.OAuth.Consumer.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OAuth, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\DotNetOpenAuth.OAuth.Core.4.0.3.12153\lib\net40-full\DotNetOpenAuth.OAuth.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OpenId, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\DotNetOpenAuth.OpenId.Core.4.0.3.12153\lib\net40-full\DotNetOpenAuth.OpenId.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OpenId.RelyingParty, Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246, processorArchitecture=MSIL">
+ <Private>True</Private>
+ <HintPath>..\packages\DotNetOpenAuth.OpenId.RelyingParty.4.0.3.12153\lib\net40-full\DotNetOpenAuth.OpenId.RelyingParty.dll</HintPath>
+ </Reference>
+ <Reference Include="WebGrease">
+ <Private>True</Private>
+ <HintPath>..\packages\WebGrease.1.1.0\lib\WebGrease.dll</HintPath>
+ </Reference>
+ <Reference Include="Antlr3.Runtime">
+ <Private>True</Private>
+ <HintPath>..\packages\WebGrease.1.1.0\lib\Antlr3.Runtime.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="App_Start\AuthConfig.cs" />
+ <Compile Include="App_Start\BundleConfig.cs" />
+ <Compile Include="App_Start\FilterConfig.cs" />
+ <Compile Include="App_Start\RouteConfig.cs" />
+ <Compile Include="App_Start\WebApiConfig.cs" />
+ <Compile Include="Controllers\AccountController.cs" />
+ <Compile Include="Controllers\HomeController.cs" />
+ <Compile Include="Controllers\PersonaController.cs" />
+ <Compile Include="Filters\InitializeSimpleMembershipAttribute.cs" />
+ <Compile Include="Global.asax.cs">
+ <DependentUpon>Global.asax</DependentUpon>
+ </Compile>
+ <Compile Include="Helpers\PersonaAuthenticationClient.cs" />
+ <Compile Include="ModelBinders\SimplePostVariableParameterBinding.cs" />
+ <Compile Include="ModelBinders\SimplePostVariableParameterBindingAttribute.cs" />
+ <Compile Include="Models\AccountModels.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Content\persona-buttons.css" />
+ <Content Include="Content\themes\base\images\ui-bg_flat_0_aaaaaa_40x100.png" />
+ <Content Include="Content\themes\base\images\ui-bg_flat_75_ffffff_40x100.png" />
+ <Content Include="Content\themes\base\images\ui-bg_glass_55_fbf9ee_1x400.png" />
+ <Content Include="Content\themes\base\images\ui-bg_glass_65_ffffff_1x400.png" />
+ <Content Include="Content\themes\base\images\ui-bg_glass_75_dadada_1x400.png" />
+ <Content Include="Content\themes\base\images\ui-bg_glass_75_e6e6e6_1x400.png" />
+ <Content Include="Content\themes\base\images\ui-bg_glass_95_fef1ec_1x400.png" />
+ <Content Include="Content\themes\base\images\ui-bg_highlight-soft_75_cccccc_1x100.png" />
+ <Content Include="Content\themes\base\images\ui-icons_222222_256x240.png" />
+ <Content Include="Content\themes\base\images\ui-icons_2e83ff_256x240.png" />
+ <Content Include="Content\themes\base\images\ui-icons_454545_256x240.png" />
+ <Content Include="Content\themes\base\images\ui-icons_888888_256x240.png" />
+ <Content Include="Content\themes\base\images\ui-icons_cd0a0a_256x240.png" />
+ <Content Include="Content\themes\base\jquery-ui.css" />
+ <Content Include="Content\themes\base\jquery.ui.accordion.css" />
+ <Content Include="Content\themes\base\jquery.ui.all.css" />
+ <Content Include="Content\themes\base\jquery.ui.autocomplete.css" />
+ <Content Include="Content\themes\base\jquery.ui.base.css" />
+ <Content Include="Content\themes\base\jquery.ui.button.css" />
+ <Content Include="Content\themes\base\jquery.ui.core.css" />
+ <Content Include="Content\themes\base\jquery.ui.datepicker.css" />
+ <Content Include="Content\themes\base\jquery.ui.dialog.css" />
+ <Content Include="Content\themes\base\jquery.ui.progressbar.css" />
+ <Content Include="Content\themes\base\jquery.ui.resizable.css" />
+ <Content Include="Content\themes\base\jquery.ui.selectable.css" />
+ <Content Include="Content\themes\base\jquery.ui.slider.css" />
+ <Content Include="Content\themes\base\jquery.ui.tabs.css" />
+ <Content Include="Content\themes\base\jquery.ui.theme.css" />
+ <Content Include="Content\themes\base\minified\images\ui-bg_flat_0_aaaaaa_40x100.png" />
+ <Content Include="Content\themes\base\minified\images\ui-bg_flat_75_ffffff_40x100.png" />
+ <Content Include="Content\themes\base\minified\images\ui-bg_glass_55_fbf9ee_1x400.png" />
+ <Content Include="Content\themes\base\minified\images\ui-bg_glass_65_ffffff_1x400.png" />
+ <Content Include="Content\themes\base\minified\images\ui-bg_glass_75_dadada_1x400.png" />
+ <Content Include="Content\themes\base\minified\images\ui-bg_glass_75_e6e6e6_1x400.png" />
+ <Content Include="Content\themes\base\minified\images\ui-bg_glass_95_fef1ec_1x400.png" />
+ <Content Include="Content\themes\base\minified\images\ui-bg_highlight-soft_75_cccccc_1x100.png" />
+ <Content Include="Content\themes\base\minified\images\ui-icons_222222_256x240.png" />
+ <Content Include="Content\themes\base\minified\images\ui-icons_2e83ff_256x240.png" />
+ <Content Include="Content\themes\base\minified\images\ui-icons_454545_256x240.png" />
+ <Content Include="Content\themes\base\minified\images\ui-icons_888888_256x240.png" />
+ <Content Include="Content\themes\base\minified\images\ui-icons_cd0a0a_256x240.png" />
+ <Content Include="Content\themes\base\minified\jquery-ui.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.accordion.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.autocomplete.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.button.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.core.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.datepicker.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.dialog.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.progressbar.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.resizable.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.selectable.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.slider.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.tabs.min.css" />
+ <Content Include="Content\themes\base\minified\jquery.ui.theme.min.css" />
+ <Content Include="favicon.ico" />
+ <Content Include="Global.asax" />
+ <None Include="Scripts\jquery-1.7.1.intellisense.js" />
+ <Content Include="Images\personasinginbutton.png" />
+ <Content Include="Scripts\jquery-1.7.1.js" />
+ <Content Include="Scripts\jquery-1.7.1.min.js" />
+ <None Include="Scripts\jquery.validate-vsdoc.js" />
+ <Content Include="Scripts\jquery-ui-1.8.20.js" />
+ <Content Include="Scripts\jquery-ui-1.8.20.min.js" />
+ <Content Include="Scripts\jquery.unobtrusive-ajax.js" />
+ <Content Include="Scripts\jquery.unobtrusive-ajax.min.js" />
+ <Content Include="Scripts\jquery.validate.js" />
+ <Content Include="Scripts\jquery.validate.min.js" />
+ <Content Include="Scripts\jquery.validate.unobtrusive.js" />
+ <Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
+ <Content Include="Scripts\knockout-2.1.0.debug.js" />
+ <Content Include="Scripts\knockout-2.1.0.js" />
+ <Content Include="Scripts\modernizr-2.5.3.js" />
+ <Content Include="Web.config" />
+ <Content Include="Web.Debug.config">
+ <DependentUpon>Web.config</DependentUpon>
+ </Content>
+ <Content Include="Web.Release.config">
+ <DependentUpon>Web.config</DependentUpon>
+ </Content>
+ <Content Include="Content\Site.css" />
+ <Content Include="Scripts\_references.js" />
+ <Content Include="Images\accent.png" />
+ <Content Include="Images\bullet.png" />
+ <Content Include="Images\heroAccent.png" />
+ <Content Include="Images\orderedList0.png" />
+ <Content Include="Images\orderedList1.png" />
+ <Content Include="Images\orderedList2.png" />
+ <Content Include="Images\orderedList3.png" />
+ <Content Include="Images\orderedList4.png" />
+ <Content Include="Images\orderedList5.png" />
+ <Content Include="Images\orderedList6.png" />
+ <Content Include="Images\orderedList7.png" />
+ <Content Include="Images\orderedList8.png" />
+ <Content Include="Images\orderedList9.png" />
+ <Content Include="Views\_ViewStart.cshtml" />
+ <Content Include="Views\Account\_ChangePasswordPartial.cshtml" />
+ <Content Include="Views\Account\_ExternalLoginsListPartial.cshtml" />
+ <Content Include="Views\Account\_RemoveExternalLoginsPartial.cshtml" />
+ <Content Include="Views\Account\_SetPasswordPartial.cshtml" />
+ <Content Include="Views\Account\Login.cshtml" />
+ <Content Include="Views\Account\Manage.cshtml" />
+ <Content Include="Views\Account\Register.cshtml" />
+ <Content Include="Views\Account\ExternalLoginFailure.cshtml" />
+ <Content Include="Views\Account\ExternalLoginConfirmation.cshtml" />
+ <Content Include="Views\Home\About.cshtml" />
+ <Content Include="Views\Home\Contact.cshtml" />
+ <Content Include="Views\Home\Index.cshtml" />
+ <Content Include="Views\Shared\Error.cshtml" />
+ <Content Include="Views\Shared\_LoginPartial.cshtml" />
+ <Content Include="Views\Shared\_Layout.cshtml" />
+ <Content Include="Views\Web.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="App_Data\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="packages.config" />
+ </ItemGroup>
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
+ <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
+ <AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
+ </Target>
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+ <WebProjectProperties>
+ <UseIIS>True</UseIIS>
+ <AutoAssignPort>True</AutoAssignPort>
+ <DevelopmentServerPort>0</DevelopmentServerPort>
+ <DevelopmentServerVPath>/</DevelopmentServerVPath>
+ <IISUrl>http://localhost:6738/</IISUrl>
+ <NTLMAuthentication>False</NTLMAuthentication>
+ <UseCustomServer>False</UseCustomServer>
+ <CustomServerUrl>
+ </CustomServerUrl>
+ <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+ </WebProjectProperties>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target> -->
</Project>
View
60 MVC4/PersonaMVC4Example/PersonaMVC4Example.csproj.user
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectView>ShowAllFiles</ProjectView>
- </PropertyGroup>
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
- <WebProjectProperties>
- <StartPageUrl>
- </StartPageUrl>
- <StartAction>SpecificPage</StartAction>
- <AspNetDebugging>True</AspNetDebugging>
- <SilverlightDebugging>False</SilverlightDebugging>
- <NativeDebugging>False</NativeDebugging>
- <SQLDebugging>False</SQLDebugging>
- <ExternalProgram>
- </ExternalProgram>
- <StartExternalURL>
- </StartExternalURL>
- <StartCmdLineArguments>
- </StartCmdLineArguments>
- <StartWorkingDirectory>
- </StartWorkingDirectory>
- <EnableENC>False</EnableENC>
- <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
- </WebProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectView>ShowAllFiles</ProjectView>
+ </PropertyGroup>
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+ <WebProjectProperties>
+ <StartPageUrl>
+ </StartPageUrl>
+ <StartAction>SpecificPage</StartAction>
+ <AspNetDebugging>True</AspNetDebugging>
+ <SilverlightDebugging>False</SilverlightDebugging>
+ <NativeDebugging>False</NativeDebugging>
+ <SQLDebugging>False</SQLDebugging>
+ <ExternalProgram>
+ </ExternalProgram>
+ <StartExternalURL>
+ </StartExternalURL>
+ <StartCmdLineArguments>
+ </StartCmdLineArguments>
+ <StartWorkingDirectory>
+ </StartWorkingDirectory>
+ <EnableENC>False</EnableENC>
+ <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
+ </WebProjectProperties>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
</Project>
View
160 MVC4/PersonaMVC4Example/Views/Account/Login.cshtml
@@ -1,80 +1,80 @@
-@model PersonaMVC4Example.Models.LoginModel
-
-@{
- ViewBag.Title = "Log in";
-}
-
-<hgroup class="title">
- <h1>@ViewBag.Title.</h1>
-</hgroup>
-
-<section id="loginForm">
-<h2>Use a local account to log in.</h2>
-@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) {
- @Html.AntiForgeryToken()
- @Html.ValidationSummary(true)
-
- <fieldset>
- <legend>Log in Form</legend>
- <ol>
- <li>
- @Html.LabelFor(m => m.UserName)
- @Html.TextBoxFor(m => m.UserName)
- @Html.ValidationMessageFor(m => m.UserName)
- </li>
- <li>
- @Html.LabelFor(m => m.Password)
- @Html.PasswordFor(m => m.Password)
- @Html.ValidationMessageFor(m => m.Password)
- </li>
- <li>
- @Html.CheckBoxFor(m => m.RememberMe)
- @Html.LabelFor(m => m.RememberMe, new { @class = "checkbox" })
- </li>
- </ol>
- <input type="submit" value="Log in" />
- </fieldset>
- <p>
- @Html.ActionLink("Register", "Register") if you don't have an account.
- </p>
-}
-</section>
-
-<section class="social" id="socialLoginForm">
- <h2>Use another service to log in.</h2>
- @Html.Action("ExternalLoginsList", new { ReturnUrl = ViewBag.ReturnUrl })
- </section>
-
-@section Scripts {
- @Scripts.Render("~/bundles/jqueryval")
-
- <!--
- Script from https://developer.mozilla.org/en-US/docs/Persona/Quick_Setup
- NEEDED FOR PERSONA - Should be moved into its own JavaScript
- -->
- <script>
- function onAssertion(assertion) {
- if (assertion) {
- $.ajax({ /* <-- This example uses jQuery, but you can use whatever you'd like */
- type: 'POST',
- url: '/api/persona/login', // This is a URL on your website.
- data: { assertion: assertion, },
- success: function (res, status, xhr) { window.location.reload(); },
- error: function (res, status, xhr) { alert("login failure" + res); }
- });
- }
- else {
- alert('Error while performing Browser ID authentication!');
- }
- }
-
- $(document).ready(function () {
- $("#personasignin").click(function () {
- navigator.id.get(onAssertion);
- return false;
- });
- });
-
-
- </script>
-}
+@model PersonaMVC4Example.Models.LoginModel
+
+@{
+ ViewBag.Title = "Log in";
+}
+
+<hgroup class="title">
+ <h1>@ViewBag.Title.</h1>
+</hgroup>
+
+<section id="loginForm">
+<h2>Use a local account to log in.</h2>
+@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) {
+ @Html.AntiForgeryToken()
+ @Html.ValidationSummary(true)
+
+ <fieldset>
+ <legend>Log in Form</legend>
+ <ol>
+ <li>
+ @Html.LabelFor(m => m.UserName)
+ @Html.TextBoxFor(m => m.UserName)
+ @Html.ValidationMessageFor(m => m.UserName)
+ </li>
+ <li>
+ @Html.LabelFor(m => m.Password)
+ @Html.PasswordFor(m => m.Password)
+ @Html.ValidationMessageFor(m => m.Password)
+ </li>
+ <li>
+ @Html.CheckBoxFor(m => m.RememberMe)
+ @Html.LabelFor(m => m.RememberMe, new { @class = "checkbox" })
+ </li>
+ </ol>
+ <input type="submit" value="Log in" />
+ </fieldset>
+ <p>
+ @Html.ActionLink("Register", "Register") if you don't have an account.
+ </p>
+}
+</section>
+
+<section class="social" id="socialLoginForm">
+ <h2>Use another service to log in.</h2>
+ @Html.Action("ExternalLoginsList", new { ReturnUrl = ViewBag.ReturnUrl })
+ </section>
+
+@section Scripts {
+ @Scripts.Render("~/bundles/jqueryval")
+
+ <!--
+ Script from https://developer.mozilla.org/en-US/docs/Persona/Quick_Setup
+ NEEDED FOR PERSONA - Should be moved into its own JavaScript
+ -->
+ <script>
+ function onAssertion(assertion) {
+ if (assertion) {
+ $.ajax({ /* <-- This example uses jQuery, but you can use whatever you'd like */
+ type: 'POST',
+ url: '/api/persona/login', // This is a URL on your website.
+ data: { assertion: assertion, },
+ success: function (res, status, xhr) { window.location.reload(); },
+ error: function (res, status, xhr) { alert("login failure" + res); }
+ });
+ }
+ else {
+ alert('Error while performing Browser ID authentication!');
+ }
+ }
+
+ $(document).ready(function () {
+ $("#personasignin").click(function () {
+ navigator.id.get(onAssertion);
+ return false;
+ });
+ });
+
+
+ </script>
+}
View
66 MVC4/PersonaMVC4Example/Views/Account/_ExternalLoginsListPartial.cshtml
@@ -1,33 +1,33 @@
-@model ICollection<AuthenticationClientData>
-
-@if (Model.Count == 0)
-{
- <div class="message-info">
- <p>There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=252166">this article</a>
- for details on setting up this ASP.NET application to support logging in via external services.</p>
- </div>
-}
-else
-{
- using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl }))
- {
- @Html.AntiForgeryToken()
- <fieldset id="socialLoginList">
- <legend>Log in using another service</legend>
- <p>
- @foreach (AuthenticationClientData p in Model)
- {
- if(p.AuthenticationClient.ProviderName == "Persona") //ya, ya, I know. I wanted cool buttons
- {
- if (!Request.IsAuthenticated) {
- <p><a href="#" class="persona-button" id="personasignin"><span>Sign in with your Email</span></a></p>
- }
- <!-- The CSS for this is in persona-buttons.css and is bundled in in BundleConfig.cs -->
- }else{
- <button type="submit" name="provider" value="@p.AuthenticationClient.ProviderName" title="Log in using your @p.DisplayName account">@p.DisplayName</button>
- }
- }
- </p>
- </fieldset>
- }
-}
+@model ICollection<AuthenticationClientData>
+
+@if (Model.Count == 0)
+{
+ <div class="message-info">
+ <p>There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkId=252166">this article</a>
+ for details on setting up this ASP.NET application to support logging in via external services.</p>
+ </div>
+}
+else
+{
+ using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = ViewBag.ReturnUrl }))
+ {
+ @Html.AntiForgeryToken()
+ <fieldset id="socialLoginList">
+ <legend>Log in using another service</legend>
+ <p>
+ @foreach (AuthenticationClientData p in Model)
+ {
+ if(p.AuthenticationClient.ProviderName == "Persona") //ya, ya, I know. I wanted cool buttons
+ {
+ if (!Request.IsAuthenticated) {
+ <p><a href="#" class="persona-button" id="personasignin"><span>Sign in with your Email</span></a></p>
+ }
+ <!-- The CSS for this is in persona-buttons.css and is bundled in in BundleConfig.cs -->
+ }else{
+ <button type="submit" name="provider" value="@p.AuthenticationClient.ProviderName" title="Log in using your @p.DisplayName account">@p.DisplayName</button>
+ }
+ }
+ </p>
+ </fieldset>
+ }
+}

0 comments on commit 05589f8

Please sign in to comment.