|
@@ -1,5 +1,5 @@
|
|
/*
|
|
/*
|
|
- * Copyright 2020-2021 the original author or authors.
|
|
|
|
|
|
+ * Copyright 2020-2022 the original author or authors.
|
|
*
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* you may not use this file except in compliance with the License.
|
|
@@ -1013,6 +1013,12 @@ public class OAuth2AuthorizationCodeRequestAuthenticationProviderTests {
|
|
OAuth2AuthorizationCodeRequestAuthenticationToken authorizationCodeRequestAuthentication =
|
|
OAuth2AuthorizationCodeRequestAuthenticationToken authorizationCodeRequestAuthentication =
|
|
authenticationException.getAuthorizationCodeRequestAuthentication();
|
|
authenticationException.getAuthorizationCodeRequestAuthentication();
|
|
assertThat(authorizationCodeRequestAuthentication.getRedirectUri()).isEqualTo(redirectUri);
|
|
assertThat(authorizationCodeRequestAuthentication.getRedirectUri()).isEqualTo(redirectUri);
|
|
|
|
+
|
|
|
|
+ // gh-595
|
|
|
|
+ if (OAuth2ErrorCodes.ACCESS_DENIED.equals(errorCode)) {
|
|
|
|
+ assertThat(authorizationCodeRequestAuthentication.isConsent()).isFalse();
|
|
|
|
+ assertThat(authorizationCodeRequestAuthentication.isConsentRequired()).isFalse();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
private static OAuth2AuthorizationCodeRequestAuthenticationToken.Builder authorizationCodeRequestAuthentication(
|
|
private static OAuth2AuthorizationCodeRequestAuthenticationToken.Builder authorizationCodeRequestAuthentication(
|