@@ -61,7 +61,7 @@ public async Task<IActionResult> OnGet(string? returnUrl)
6161 public async Task < IActionResult > OnPost ( )
6262 {
6363 // check if we are in the context of an authorization request
64- var context = await _interaction . GetAuthorizationContextAsync ( Input . ReturnUrl ) ;
64+ var context = await _interaction . GetAuthorizationContextAsync ( Input . ReturnUrl , HttpContext . RequestAborted ) ;
6565
6666 // the user clicked the "cancel" button
6767 if ( Input . Button != "login" )
@@ -74,7 +74,7 @@ public async Task<IActionResult> OnPost()
7474 // if the user cancels, send a result back into IdentityServer as if they
7575 // denied the consent (even if this client does not require consent).
7676 // this will send back an access denied OIDC error response to the client.
77- await _interaction . DenyAuthorizationAsync ( context , AuthorizationError . AccessDenied ) ;
77+ await _interaction . DenyAuthorizationAsync ( context , AuthorizationError . AccessDenied , HttpContext . RequestAborted ) ;
7878
7979 // we can trust model.ReturnUrl since GetAuthorizationContextAsync returned non-null
8080 if ( context . IsNativeClient ( ) )
@@ -99,7 +99,7 @@ public async Task<IActionResult> OnPost()
9999 if ( _users . ValidateCredentials ( Input . Username , Input . Password ) )
100100 {
101101 var user = _users . FindByUsername ( Input . Username ) ;
102- await _events . RaiseAsync ( new UserLoginSuccessEvent ( user . Username , user . SubjectId , user . Username , clientId : context ? . Client . ClientId ) ) ;
102+ await _events . RaiseAsync ( new UserLoginSuccessEvent ( user . Username , user . SubjectId , user . Username , clientId : context ? . Client . ClientId ) , HttpContext . RequestAborted ) ;
103103 Telemetry . Metrics . UserLogin ( context ? . Client . ClientId , IdentityServerConstants . LocalIdentityProvider ) ;
104104
105105 // only set explicit expiration here if user chooses "remember me".
@@ -152,7 +152,7 @@ public async Task<IActionResult> OnPost()
152152 }
153153
154154 const string error = "invalid credentials" ;
155- await _events . RaiseAsync ( new UserLoginFailureEvent ( Input . Username , error , clientId : context ? . Client . ClientId ) ) ;
155+ await _events . RaiseAsync ( new UserLoginFailureEvent ( Input . Username , error , clientId : context ? . Client . ClientId ) , HttpContext . RequestAborted ) ;
156156 Telemetry . Metrics . UserLoginFailure ( context ? . Client . ClientId , IdentityServerConstants . LocalIdentityProvider , error ) ;
157157 ModelState . AddModelError ( string . Empty , LoginOptions . InvalidCredentialsErrorMessage ) ;
158158 }
@@ -169,7 +169,7 @@ private async Task BuildModelAsync(string? returnUrl)
169169 ReturnUrl = returnUrl
170170 } ;
171171
172- var context = await _interaction . GetAuthorizationContextAsync ( returnUrl ) ;
172+ var context = await _interaction . GetAuthorizationContextAsync ( returnUrl , HttpContext . RequestAborted ) ;
173173 if ( context ? . IdP != null && await _schemeProvider . GetSchemeAsync ( context . IdP ) != null )
174174 {
175175 var local = context . IdP == Duende . IdentityServer . IdentityServerConstants . LocalIdentityProvider ;
@@ -200,7 +200,7 @@ private async Task BuildModelAsync(string? returnUrl)
200200 displayName : x . DisplayName ?? x . Name
201201 ) ) . ToList ( ) ;
202202
203- var dynamicSchemes = ( await _identityProviderStore . GetAllSchemeNamesAsync ( ) )
203+ var dynamicSchemes = ( await _identityProviderStore . GetAllSchemeNamesAsync ( HttpContext . RequestAborted ) )
204204 . Where ( x => x . Enabled )
205205 . Select ( x => new ViewModel . ExternalProvider
206206 (
0 commit comments