Skip to content

Commit

Permalink
Merge branch 'dev' into AspNet-Core-3
Browse files Browse the repository at this point in the history
  • Loading branch information
martincostello committed Jun 13, 2019
2 parents 287e87b + 0de480b commit f1cbc9f
Show file tree
Hide file tree
Showing 25 changed files with 53 additions and 21,311 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
_Summarize the changes this Pull Request makes._

_If adding a new provider, please ensure you have included appropiate test(s)._
_If adding a new provider, please ensure you have included appropriate test(s)._

_Please include a reference to a GitHub issue if appropriate._
1 change: 1 addition & 0 deletions AspNet.Security.OpenId.Providers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
global.json = global.json
korebuild-lock.txt = korebuild-lock.txt
korebuild.json = korebuild.json
LICENSE = LICENSE
NuGet.config = NuGet.config
README.md = README.md
run.cmd = run.cmd
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AspNet.Security.OpenId.Providers

**AspNet.Security.OpenId.Providers** is a **collection of security middleware** that you can use in your **ASP.NET Core** application to support OpenID 2.0 authentication providers like **[Steam](http://steampowered.com/)**, **[Wargaming](http://wargaming.net/)** or **[Orange](http://www.orange.fr/)**. It is directly inspired by **[Jerrie Pelser](https://github.com/jerriep)**'s initiative, **[Owin.Security.Providers](https://github.com/RockstarLabs/OwinOAuthProviders)**.
**AspNet.Security.OpenId.Providers** is a **collection of security middleware** that you can use in your **ASP.NET Core** application to support OpenID 2.0 authentication providers like **[Steam](https://steampowered.com/)**, **[Wargaming](https://wargaming.net/)** or **[Orange](https://www.orange.fr/)**. It is directly inspired by **[Jerrie Pelser](https://github.com/jerriep)**'s initiative, **[Owin.Security.Providers](https://github.com/RockstarLabs/OwinOAuthProviders)**.

**The latest official release can be found on [NuGet](https://www.nuget.org/profiles/aspnet-contrib) and the nightly builds on [MyGet](https://www.myget.org/gallery/aspnet-contrib)**.

Expand Down Expand Up @@ -63,9 +63,9 @@ If a provider you're looking for does not exist, consider making a PR to add one

| Provider | Stable | Nightly | Documentation |
|:-:|:-:|:-:|:-:|
| OpenId | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OpenId?includePreReleases=false)](http://www.nuget.org/packages/AspNet.Security.OpenId/ "Download AspNet.Security.OpenId from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OpenId?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OpenId "Download AspNet.Security.OpenId from MyGet.org") | N/A |
| Steam | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OpenId.Steam?includePreReleases=false)](http://www.nuget.org/packages/AspNet.Security.OpenId.Steam/ "Download AspNet.Security.OpenId.Steam from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OpenId.Steam?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OpenId.Steam "Download AspNet.Security.OpenId.Steam from MyGet.org") | [Documentation](https://steamcommunity.com/dev "Steam developer documentation") |
| OpenId | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OpenId?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OpenId/ "Download AspNet.Security.OpenId from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OpenId?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OpenId "Download AspNet.Security.OpenId from MyGet.org") | N/A |
| Steam | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OpenId.Steam?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OpenId.Steam/ "Download AspNet.Security.OpenId.Steam from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OpenId.Steam?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OpenId.Steam "Download AspNet.Security.OpenId.Steam from MyGet.org") | [Documentation](https://steamcommunity.com/dev "Steam developer documentation") |

<!--
| CHANGEME | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OpenId.CHANGEME?includePreReleases=false)](http://www.nuget.org/packages/AspNet.Security.OpenId.CHANGEME/ "Download AspNet.Security.OpenId.CHANGEME from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OpenId.CHANGEME?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OpenId.CHANGEME "Download AspNet.Security.OpenId.CHANGEME from MyGet.org") | [Documentation](CHANGEME "CHANGEME developer documentation") |
| CHANGEME | [![NuGet](https://buildstats.info/nuget/AspNet.Security.OpenId.CHANGEME?includePreReleases=false)](https://www.nuget.org/packages/AspNet.Security.OpenId.CHANGEME/ "Download AspNet.Security.OpenId.CHANGEME from NuGet.org") | [![MyGet](https://buildstats.info/myget/aspnet-contrib/AspNet.Security.OpenId.CHANGEME?includePreReleases=false)](https://www.myget.org/feed/aspnet-contrib/package/nuget/AspNet.Security.OpenId.CHANGEME "Download AspNet.Security.OpenId.CHANGEME from MyGet.org") | [Documentation](CHANGEME "CHANGEME developer documentation") |
-->
5 changes: 1 addition & 4 deletions samples/Mvc.Client/Controllers/AuthenticationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ namespace Mvc.Client.Controllers
public class AuthenticationController : Controller
{
[HttpGet("~/signin")]
public async Task<IActionResult> SignIn()
{
return View("SignIn", await HttpContext.GetExternalProvidersAsync());
}
public async Task<IActionResult> SignIn() => View("SignIn", await HttpContext.GetExternalProvidersAsync());

[HttpPost("~/signin")]
public async Task<IActionResult> SignIn([FromForm] string provider)
Expand Down
4 changes: 2 additions & 2 deletions samples/Mvc.Client/Views/Authentication/SignIn.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<h1>Authentication</h1>
<p class="lead text-left">Sign in using one of these external providers:</p>

@foreach (var scheme in Model)
@foreach (var scheme in Model.OrderBy(p => p.DisplayName))
{
<form action="/signin" method="post">
<input type="hidden" name="Provider" value="@scheme.Name" />
<input type="hidden" name="ReturnUrl" value="@ViewBag.ReturnUrl" />

<button class="btn btn-lg btn-success" type="submit">Connect using @scheme.DisplayName</button>
<button class="btn btn-lg btn-success m-1" type="submit">Connect using @scheme.DisplayName</button>
</form>
}
</div>
17 changes: 9 additions & 8 deletions samples/Mvc.Client/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
@model string

<div class="jumbotron">
@if (User?.Identity?.IsAuthenticated ?? false) {
<div class="jumbotron">
@if (User?.Identity?.IsAuthenticated ?? false)
{
<h1>Welcome, @User.Identity.Name</h1>

<p>
@foreach (var claim in Context.User.Claims) {
<div>@claim.Type: <b>@claim.Value</b></div>
@foreach (var claim in Context.User.Claims)
{
<div><code>@claim.Type</code>: <strong>@claim.Value</strong></div>
}
</p>

<a class="btn btn-lg btn-danger" href="/signout?returnUrl=%2F">Sign out</a>
}

else {
else
{
<h1>Welcome, anonymous</h1>
<a class="btn btn-lg btn-success" href="/signin?returnUrl=%2F">Sign in</a>
}
Expand Down
18 changes: 10 additions & 8 deletions samples/Mvc.Client/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,26 @@
<meta name="description" content="" />
<meta name="author" content="" />

<title>Mvc.Client (OSOS sample)</title>
<title>Mvc.Client (OpenID 2.0 sample)</title>

<link href="~/stylesheets/bootstrap.min.css" rel="stylesheet" />
<link href="~/stylesheets/jumbotron-narrow.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.slim.min.js" integrity="sha256-pasqAKBDmFT4eHoN2ndd6lN370kFiGUFyTiUHWhU7k8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.15.0/umd/popper.min.js" integrity="sha256-fTuUgtT7O2rqoImwjrhDgbXTKUwyxxujIMRIK7TbuNU=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>

<body>
<div class="container">
<main class="container">
<div class="header">
<h3 class="text-muted">Your application (Mvc.Client)</h3>
</div>

@RenderBody()

<div class="footer">
<p>&copy; Your company 2014</p>
</div>
<footer>
<p>&copy; Your company @DateTime.UtcNow.Year</p>
</footer>

</div>
</main>
</body>
</html>
Binary file not shown.
Loading

0 comments on commit f1cbc9f

Please sign in to comment.