@@ -42,16 +42,10 @@ protected void open(final String authorizationCodeRequestUrl) throws LoginCancel
4242 @ Override
4343 public String prompt (final Host bookmark , final LoginCallback prompt , final String authorizationCodeUrl , final String redirectUri , final String state ) throws BackgroundException {
4444 log .debug ("Evaluate redirect URI {}" , redirectUri );
45- if (StringUtils .endsWith (URIEncoder .decode (redirectUri ), ":oauth" )) {
46- return new CustomSchemeHandlerOAuth2AuthorizationCodeProvider ().prompt (
47- bookmark , prompt , authorizationCodeUrl , redirectUri , state );
48- }
49- if (StringUtils .contains (redirectUri , "://oauth" )) {
50- return new CustomSchemeHandlerOAuth2AuthorizationCodeProvider ().prompt (
51- bookmark , prompt , authorizationCodeUrl , redirectUri , state );
45+ if (StringUtils .endsWith (URIEncoder .decode (redirectUri ), ":oauth" ) || StringUtils .contains (redirectUri , "://oauth" )) {
46+ return new CustomSchemeHandlerOAuth2AuthorizationCodeProvider ().prompt (bookmark , prompt , authorizationCodeUrl , redirectUri , state );
5247 }
5348 log .debug ("Prompt for authentication code for state {}" , state );
54- return new PromptOAuth2AuthorizationCodeProvider ().prompt (
55- bookmark , prompt , authorizationCodeUrl , redirectUri , state );
49+ return new PromptOAuth2AuthorizationCodeProvider ().prompt (bookmark , prompt , authorizationCodeUrl , redirectUri , state );
5650 }
5751}
0 commit comments