From a56004fbef40cb290a86277d450dc963667e5f40 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 3 Oct 2019 18:15:08 +0900 Subject: [PATCH] Remove a warning on .netcoreapp3.0 --- .../Controllers/AuthorizationController.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/BTCPayServer/Controllers/AuthorizationController.cs b/BTCPayServer/Controllers/AuthorizationController.cs index 523e12f4a..3f604e40c 100644 --- a/BTCPayServer/Controllers/AuthorizationController.cs +++ b/BTCPayServer/Controllers/AuthorizationController.cs @@ -49,10 +49,10 @@ namespace BTCPayServer.Controllers [Authorize(AuthenticationSchemes = Policies.CookieAuthentication)] [HttpGet("/connect/authorize")] - public async Task Authorize(OpenIdConnectRequest request) + public async Task Authorize(OpenIdConnectRequest openIdConnectRequest) { // Retrieve the application details from the database. - var application = await _applicationManager.FindByClientIdAsync(request.ClientId); + var application = await _applicationManager.FindByClientIdAsync(openIdConnectRequest.ClientId); if (application == null) { @@ -67,9 +67,9 @@ namespace BTCPayServer.Controllers var userId = _userManager.GetUserId(User); if (!string.IsNullOrEmpty( - await OpenIdExtensions.IsUserAuthorized(_authorizationManager, request, userId, application.Id))) + await OpenIdExtensions.IsUserAuthorized(_authorizationManager, openIdConnectRequest, userId, application.Id))) { - return await Authorize(request, "YES", false); + return await Authorize(openIdConnectRequest, "YES", false); } // Flow the request_id to allow OpenIddict to restore @@ -77,14 +77,14 @@ namespace BTCPayServer.Controllers return View(new AuthorizeViewModel { ApplicationName = await _applicationManager.GetDisplayNameAsync(application), - RequestId = request.RequestId, - Scope = request.GetScopes() + RequestId = openIdConnectRequest.RequestId, + Scope = openIdConnectRequest.GetScopes() }); } [Authorize(AuthenticationSchemes = Policies.CookieAuthentication)] [HttpPost("/connect/authorize")] - public async Task Authorize(OpenIdConnectRequest request, + public async Task Authorize(OpenIdConnectRequest openIdConnectRequest, string consent, bool createAuthorization = true) { var user = await _userManager.GetUserAsync(User); @@ -119,10 +119,10 @@ namespace BTCPayServer.Controllers var ticket = await OpenIdExtensions.CreateAuthenticationTicket(_applicationManager, _authorizationManager, _IdentityOptions.Value, _signInManager, - request, user); + openIdConnectRequest, user); if (createAuthorization) { - var application = await _applicationManager.FindByClientIdAsync(request.ClientId); + var application = await _applicationManager.FindByClientIdAsync(openIdConnectRequest.ClientId); var authorization = await _authorizationManager.CreateAsync(User, user.Id, application.Id, type, ticket.GetScopes().ToImmutableArray(), ticket.Properties.Items.ToImmutableDictionary());