Skip to content

Commit 0f258a8

Browse files
author
Mário Monteiro
committedOct 24, 2016
working...
1 parent 500db79 commit 0f258a8

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed
 

‎.providers/google+provider.zip

185 KB
Binary file not shown.

‎IdentityServerWithAspNetIdentity/Config.cs

-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ public static List<InMemoryUser> GetUsers()
9292
Subject = "1",
9393
Username = "alice",
9494
Password = "password",
95-
9695
Claims = new []
9796
{
9897
new Claim("name", "Alice"),

‎IdentityServerWithAspNetIdentity/Startup.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
4848
app.UseStaticFiles();
4949
app.UseMvcWithDefaultRoute();
5050

51-
app.Run(async (context) =>
52-
{
53-
await context.Response.WriteAsync("Hello World!");
54-
});
51+
//app.Run(async (context) =>
52+
//{
53+
// await context.Response.WriteAsync("Hello World!");
54+
//});
5555
}
5656
}
5757
}

‎IdentityServerWithAspNetIdentity/project.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"Microsoft.AspNetCore.Mvc": "1.0.0",
1111
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
1212
"Microsoft.Extensions.Logging.Console": "1.0.0",
13-
"IdentityServer4": "1.0.0-rc2"
13+
"IdentityServer4": "1.0.0-rc2",
14+
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",
15+
"Microsoft.AspNetCore.Authentication.Google": "1.0.0"
1416
},
1517

1618
"tools": {

‎MvcClient/Views/Shared/_Layout.cshtml

+9-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,16 @@
3232
<div class="navbar-collapse collapse">
3333
<ul class="nav navbar-nav">
3434
<li><a asp-area="" asp-controller="Home" asp-action="Index">Home</a></li>
35+
@*Always Show Secure to view Claims*@
3536
<li><a asp-area="" asp-controller="Home" asp-action="Secure">Secure</a></li>
36-
<li><a asp-area="" asp-controller="Home" asp-action="Logout">Logout</a></li>
37+
@if (User.Identity.IsAuthenticated)
38+
{
39+
<li><a asp-area="" asp-controller="Home" asp-action="Logout">Logout</a></li>
40+
}
41+
else
42+
{
43+
<li><a asp-area="" asp-controller="Home" asp-action="Secure">Login</a></li>
44+
}
3745
</ul>
3846
</div>
3947
</div>

‎README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
- Setup [identityserver4](http://identityserver4.readthedocs.io/en/dev/quickstarts/0_overview.html)
2-
- Blog [Post](http://blog.koakh.com/backend/rainlab/blog/posts/update/242) Notes
1+
- Setup [identityserver4](http://identityserver4.readthedocs.io/en/dev/quickstarts/0_overview.html)

0 commit comments

Comments
 (0)
Please sign in to comment.