yavsc/testOauthClient/Controllers/AuthenticationController.cs

17 lines
644 B
C#
Raw Normal View History

2016-06-01 23:47:06 +02:00

using Microsoft.AspNet.Http.Authentication;
using Microsoft.AspNet.Mvc;
namespace Mvc.Client.Controllers {
public class AuthenticationController : Controller {
[HttpGet("~/signin")]
2016-06-06 12:38:11 +02:00
public ActionResult SignIn() {
2016-06-01 23:47:06 +02:00
// 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
2016-06-07 00:20:05 +02:00
var properties = new AuthenticationProperties { RedirectUri = "http://localhost:5002/signin-yavsc" };
2016-06-12 01:32:51 +02:00
return new ChallengeResult("Yavsc", properties);
2016-06-01 23:47:06 +02:00
}
}
}