Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1282)

Issue 194980043: Issue 6: Create an ASP.Net MVC Sample

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 3 months ago by jmcgrew
Modified:
8 years, 10 months ago
Reviewers:
class, peleyal, LindaL
CC:
google-api-dotnet-client_googlegroups.com
Base URL:
https://google-api-dotnet-client.samples.googlecode.com/hg/
Visibility:
Public.

Description

Issue 6: Create an ASP.Net MVC Sample

Patch Set 1 : Correct base revision #

Total comments: 29

Patch Set 2 : Addressed first round of review notes #

Total comments: 10

Patch Set 3 : Import order, dev console link, AssemblyInfo comment #

Total comments: 17

Patch Set 4 : Addressed peleyal's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28910 lines, -1 line) Patch
M .hgignore View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/App_Start/BundleConfig.cs View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/App_Start/FilterConfig.cs View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/App_Start/IdentityConfig.cs View 1 2 3 1 chunk +123 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/App_Start/MyClaimTypes.cs View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/App_Start/MyClientSecrets.cs View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/App_Start/MyRequestedScopes.cs View 1 2 3 1 chunk +40 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/App_Start/RouteConfig.cs View 1 2 3 1 chunk +25 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/App_Start/Startup.Auth.cs View 1 2 3 1 chunk +116 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Calendar.ASP.NET.MVC5.csproj View 1 2 3 1 chunk +343 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Content/Site.css View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Content/bootstrap.css View 1 2 3 1 chunk +6566 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Content/bootstrap-theme.css View 1 2 3 1 chunk +476 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Content/bootstrap-theme.css.map View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Content/bootstrap-theme.min.css View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Content/bootstrap.css.map View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Content/bootstrap.min.css View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Controllers/AccountController.cs View 1 2 3 1 chunk +240 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Controllers/CalendarController.cs View 1 2 3 1 chunk +134 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Controllers/HomeController.cs View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Global.asax View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Global.asax.cs View 1 2 3 1 chunk +23 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Migrations/201411270135001_Init.cs View 1 2 3 1 chunk +101 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Migrations/201411270135001_Init.resx View 1 2 3 1 chunk +126 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Migrations/201411270135001_Init.Designer.cs View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Migrations/Configuration.cs View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Models/AccountViewModels.cs View 1 2 3 1 chunk +115 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Models/CalendarEventGroup.cs View 1 2 3 1 chunk +42 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Models/CalendarViewModels.cs View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Models/IdentityModels.cs View 1 2 3 1 chunk +36 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Properties/AssemblyInfo.cs View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/_references.js View 1 2 3 Binary file 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/bootstrap.js View 1 2 3 1 chunk +2306 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/bootstrap.min.js View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/jquery-2.1.3.js View 1 2 3 1 chunk +9205 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/jquery-2.1.3.intellisense.js View 1 2 3 1 chunk +2670 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/jquery-2.1.3.min.js View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/jquery-2.1.3.min.map View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/jquery.validate.js View 1 2 3 1 chunk +1365 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/jquery.validate-vsdoc.js View 1 2 3 1 chunk +1288 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/jquery.validate.min.js View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/jquery.validate.unobtrusive.js View 1 2 3 1 chunk +429 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/jquery.validate.unobtrusive.min.js View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/modernizr-2.8.3.js View 1 2 3 1 chunk +1406 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/respond.js View 1 2 3 1 chunk +224 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/respond.matchmedia.addListener.js View 1 2 3 1 chunk +273 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/respond.matchmedia.addListener.min.js View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Scripts/respond.min.js View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Startup.cs View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/Account/ExternalLoginConfirmation.cshtml View 1 2 3 1 chunk +39 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/Account/ExternalLoginFailure.cshtml View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/Account/Login.cshtml View 1 2 3 1 chunk +23 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/Account/_ExternalLoginsListPartial.cshtml View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/Calendar/UpcomingEvents.cshtml View 1 2 3 1 chunk +81 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/Home/Index.cshtml View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/Shared/Error.cshtml View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/Shared/Lockout.cshtml View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/Shared/_Layout.cshtml View 1 2 3 1 chunk +68 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/Shared/_LoginPartial.cshtml View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/Web.config View 1 2 3 1 chunk +35 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Views/_ViewStart.cshtml View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Web.config View 1 2 3 1 chunk +92 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Web.Debug.config View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/Web.Release.config View 1 2 3 1 chunk +31 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/favicon.ico View 1 2 3 Binary file 0 comments Download
A Calendar.ASP.NET.MVC5/fonts/glyphicons-halflings-regular.eot View 1 2 3 Binary file 0 comments Download
A Calendar.ASP.NET.MVC5/fonts/glyphicons-halflings-regular.svg View 1 2 3 1 chunk +288 lines, -0 lines 0 comments Download
A Calendar.ASP.NET.MVC5/fonts/glyphicons-halflings-regular.ttf View 1 2 3 Binary file 0 comments Download
A Calendar.ASP.NET.MVC5/fonts/glyphicons-halflings-regular.woff View 1 2 3 Binary file 0 comments Download
A Calendar.ASP.NET.MVC5/fonts/glyphicons-halflings-regular.woff2 View 1 2 3 Binary file 0 comments Download
A Calendar.ASP.NET.MVC5/packages.config View 1 2 3 1 chunk +41 lines, -0 lines 0 comments Download
M GoogleApisSamples.sln View 1 2 3 3 chunks +13 lines, -1 line 0 comments Download

Messages

Total messages: 17
jmcgrew
9 years, 3 months ago (2015-01-09 02:53:13 UTC) #1
jmcgrew
Hmm, looks like I used the wrong base revision for these diffs...
9 years, 3 months ago (2015-01-09 02:56:17 UTC) #2
jmcgrew
On 2015/01/09 02:56:17, jmcgrew wrote: > Hmm, looks like I used the wrong base revision ...
9 years, 3 months ago (2015-01-09 18:47:33 UTC) #3
peleyal
Looks pretty good :) Some things to consider: 1. I didn't run this sample, just ...
9 years, 3 months ago (2015-01-12 08:11:24 UTC) #4
jmcgrew
https://codereview.appspot.com/194980043/diff/10001/Calendar.ASP.NET.MVC5/App_Start/BundleConfig.cs File Calendar.ASP.NET.MVC5/App_Start/BundleConfig.cs (right): https://codereview.appspot.com/194980043/diff/10001/Calendar.ASP.NET.MVC5/App_Start/BundleConfig.cs#newcode1 Calendar.ASP.NET.MVC5/App_Start/BundleConfig.cs:1: using System.Web; On 2015/01/12 08:11:24, peleyal wrote: > Did ...
9 years, 2 months ago (2015-02-20 02:53:17 UTC) #5
class
Added a few notes on outstanding comments. https://codereview.appspot.com/194980043/diff/10001/Calendar.ASP.NET.MVC5/App_Start/MyRequestedScopes.cs File Calendar.ASP.NET.MVC5/App_Start/MyRequestedScopes.cs (right): https://codereview.appspot.com/194980043/diff/10001/Calendar.ASP.NET.MVC5/App_Start/MyRequestedScopes.cs#newcode14 Calendar.ASP.NET.MVC5/App_Start/MyRequestedScopes.cs:14: "openid", On ...
9 years, 2 months ago (2015-02-23 17:08:35 UTC) #6
jmcgrew
This addresses most of the 2nd round of notes - I still need to look ...
9 years, 1 month ago (2015-02-28 01:33:41 UTC) #7
jmcgrew
https://codereview.appspot.com/194980043/diff/20001/Calendar.ASP.NET.MVC5/Scripts/jquery-2.1.3.js File Calendar.ASP.NET.MVC5/Scripts/jquery-2.1.3.js (right): https://codereview.appspot.com/194980043/diff/20001/Calendar.ASP.NET.MVC5/Scripts/jquery-2.1.3.js#newcode2 Calendar.ASP.NET.MVC5/Scripts/jquery-2.1.3.js:2: * jQuery JavaScript Library v2.1.3 On 2015/02/23 17:08:35, class ...
9 years, 1 month ago (2015-03-03 00:41:16 UTC) #8
class
I'd consider the CDN-hosting of libraries a nit at this point. LGTM. https://codereview.appspot.com/194980043/diff/20001/Calendar.ASP.NET.MVC5/Scripts/jquery-2.1.3.js File Calendar.ASP.NET.MVC5/Scripts/jquery-2.1.3.js ...
9 years, 1 month ago (2015-03-03 19:39:37 UTC) #9
peleyal
I'll take a brief look later on this week, I prefer to take another look, ...
9 years, 1 month ago (2015-03-04 15:08:14 UTC) #10
peleyal
I'm not an ASP.NET MVC expert, so it is a little bit hard to understand ...
9 years, 1 month ago (2015-03-07 00:17:44 UTC) #11
jmcgrew
https://codereview.appspot.com/194980043/diff/30001/Calendar.ASP.NET.MVC5/App_Start/IdentityConfig.cs File Calendar.ASP.NET.MVC5/App_Start/IdentityConfig.cs (right): https://codereview.appspot.com/194980043/diff/30001/Calendar.ASP.NET.MVC5/App_Start/IdentityConfig.cs#newcode32 Calendar.ASP.NET.MVC5/App_Start/IdentityConfig.cs:32: using Microsoft.Owin.Security; On 2015/03/07 00:17:43, peleyal wrote: > Please ...
9 years ago (2015-04-06 23:01:52 UTC) #12
peleyal
Sorry it takes forever :) Just I still didn't get if the client library can ...
9 years ago (2015-04-08 13:36:20 UTC) #13
LindaL
On 2015/04/08 13:36:20, peleyal wrote: > Sorry it takes forever :) > Just I still ...
8 years, 10 months ago (2015-06-26 08:21:10 UTC) #14
jmcgrew
On 2015/06/26 08:21:10, LindaL wrote: > On 2015/04/08 13:36:20, peleyal wrote: > > Sorry it ...
8 years, 10 months ago (2015-06-26 18:33:54 UTC) #15
peleyal
Be aware that I'm going to release a new library in two weeks from now... ...
8 years, 10 months ago (2015-06-26 19:11:30 UTC) #16
LindaL
8 years, 10 months ago (2015-06-29 09:12:52 UTC) #17
I sent the link to someone anyway,  it helped him fix his problem.
Thought you would like to know that :)

I am still MVC nub so pointing him at your tutorial worked.

Linda

On Fri, Jun 26, 2015 at 9:11 PM, Eyal Peled <peleyal@google.com> wrote:

> Be aware that I'm going to release a new library in two weeks from now...
> so if you are going to push it next week it will be awesome!
>
> On Fri, Jun 26, 2015 at 2:33 PM <jmcgrew@google.com> wrote:
>
>> On 2015/06/26 08:21:10, LindaL wrote:
>> > On 2015/04/08 13:36:20, peleyal wrote:
>> > > Sorry it takes forever :)
>> > > Just I still didn't get if the client library can already store your
>> > credential
>> > > (like we discussed offline).
>> > >
>> > > Besides that LGTM
>> > >
>> > > Can you also attach some screenshots of screen to CL description?
>> > >
>> > > Thanks!
>> > >
>> > >
>>
>>
>>
https://codereview.appspot.com/194980043/diff/30001/Calendar.ASP.NET.MVC5/App...
>> > > File Calendar.ASP.NET.MVC5/App_Start/IdentityConfig.cs (right):
>> > >
>> > >
>>
>>
>>
https://codereview.appspot.com/194980043/diff/30001/Calendar.ASP.NET.MVC5/App...
>> > > Calendar.ASP.NET.MVC5/App_Start/IdentityConfig.cs:103: var
>> googleRefreshToken
>> > =
>> > > externalIdentity.FindFirst(MyClaimTypes.GoogleRefreshToken);
>> > > On 2015/04/06 23:01:52, jmcgrew wrote:
>> > > > On 2015/03/07 00:17:43, peleyal wrote:
>> > > > > Why do we need to save the access and refresh token here? They
>> should be
>> > > > stored
>> > > > > in the auth library (using the data store)? It looks like I'm
>> missing
>> > > > something
>> > > >
>> > > > These tokens are returned in the OAuth login response to the MVC
>> third-party
>> > > > login provider. At Startup.Auth.cs:86, we copy them into a
>> temporary
>> > identity,
>> > > > and then here we copy them from the temporary identity to the real
>> identity
>> > > > where they'll be stored alongside the rest of the user's MVC
>> profile. Is
>> > there
>> > > > an advantage to storing them in the API client's data store
>> instead?
>> > >
>> > > It just that the client library already stored all those values
>> (except user
>> > id)
>> > > for you, so why do we need to store them in two different places?
>>
>> > Was this released?  I have someone on my website looking for some help
>> with MVC
>> > / owin / client lib mix authentication.
>>
>> It hasn't been released yet - the migration to Github caught me at a
>> busy time so I haven't had much of a chance to push it through the new
>> release process. I've added it to my todo list for next week.
>>
>> https://codereview.appspot.com/194980043/
>>
>


-- 
Linda Lawton

Google Developer Expert for Google Analytics
<https://developers.google.com/experts/people/linda-lawton>
Blog - Daimto.com <http://www.daimto.com/>
Google+ - Linda Lawton  <https://plus.google.com/u/0/+LindaLawton>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b