|
20 | 20 | namespace Microsoft.eShopOnContainers.Services.Identity.API.Controllers |
21 | 21 | { |
22 | 22 | /// <summary> |
23 | | - /// This sample controller implements a typical login/logout/provision workflow for local and external accounts. |
| 23 | + /// This sample controller implements a typical login/logout/provision workflow for local accounts. |
24 | 24 | /// The login service encapsulates the interactions with the user data store. This data store is in-memory only and cannot be used for production! |
25 | 25 | /// The interaction service provides a way for the UI to communicate with identityserver for validation and context retrieval |
26 | 26 | /// </summary> |
@@ -58,8 +58,7 @@ public async Task<IActionResult> Login(string returnUrl) |
58 | 58 | var context = await _interaction.GetAuthorizationContextAsync(returnUrl); |
59 | 59 | if (context?.IdP != null) |
60 | 60 | { |
61 | | - // if IdP is passed, then bypass showing the login screen |
62 | | - return ExternalLogin(context.IdP, returnUrl); |
| 61 | + throw new NotImplementedException("External login is not implemented!"); |
63 | 62 | } |
64 | 63 |
|
65 | 64 | var vm = await BuildLoginViewModelAsync(returnUrl, context); |
@@ -209,7 +208,7 @@ public async Task<IActionResult> Logout(LogoutViewModel model) |
209 | 208 | } |
210 | 209 | catch (Exception ex) |
211 | 210 | { |
212 | | - _logger.LogCritical(ex.Message); |
| 211 | + _logger.LogError(ex, "LOGOUT ERROR: {ExceptionMessage}", ex.Message); |
213 | 212 | } |
214 | 213 | } |
215 | 214 |
|
@@ -238,28 +237,6 @@ public async Task<IActionResult> DeviceLogOut(string redirectUrl) |
238 | 237 | return Redirect(redirectUrl); |
239 | 238 | } |
240 | 239 |
|
241 | | - /// <summary> |
242 | | - /// initiate roundtrip to external authentication provider |
243 | | - /// </summary> |
244 | | - [HttpGet] |
245 | | - public IActionResult ExternalLogin(string provider, string returnUrl) |
246 | | - { |
247 | | - if (returnUrl != null) |
248 | | - { |
249 | | - returnUrl = UrlEncoder.Default.Encode(returnUrl); |
250 | | - } |
251 | | - returnUrl = "/account/externallogincallback?returnUrl=" + returnUrl; |
252 | | - |
253 | | - // start challenge and roundtrip the return URL |
254 | | - var props = new AuthenticationProperties |
255 | | - { |
256 | | - RedirectUri = returnUrl, |
257 | | - Items = { { "scheme", provider } } |
258 | | - }; |
259 | | - return new ChallengeResult(provider, props); |
260 | | - } |
261 | | - |
262 | | - |
263 | 240 | // GET: /Account/Register |
264 | 241 | [HttpGet] |
265 | 242 | [AllowAnonymous] |
|
0 commit comments