oidc
This commit is contained in:
parent
9342d48c9d
commit
e85b41313f
41 changed files with 740 additions and 57 deletions
19
testOauthClient/Controllers/AuthenticationController.cs
Normal file
19
testOauthClient/Controllers/AuthenticationController.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
using Microsoft.AspNet.Authentication.OpenIdConnect;
|
||||
using Microsoft.AspNet.Http.Authentication;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace Mvc.Client.Controllers {
|
||||
|
||||
public class AuthenticationController : Controller {
|
||||
|
||||
[HttpGet("~/signin")]
|
||||
public ActionResult SignIn(string returnUrl) {
|
||||
// Instruct the OIDC client middleware to redirect the user agent to the identity provider.
|
||||
// Note: the authenticationType parameter must match the value configured in Startup.cs
|
||||
var properties = new AuthenticationProperties { RedirectUri = "http://localhost:5002/" };
|
||||
return new ChallengeResult(OpenIdConnectDefaults.AuthenticationScheme, properties);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue