New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOAPUIOS-194-Adding OAuth 1 support. #231
Conversation
…//github.com/SmartBear/soapui into SOAPUIOS-194-Add-OAuth1-support
@antone-sb any objections? |
@@ -40,7 +40,7 @@ public GetOAuthAccessTokenAction(OAuth2Profile target) { | |||
public void actionPerformed(ActionEvent event) { | |||
try { | |||
getOAuthClientFacade().requestAccessToken(target); | |||
} catch (InvalidOAuth2ParametersException e) { | |||
} catch (InvalidOAuthParametersException e) { | |||
UISupport.showErrorMessage("Invalid OAuth 2 parameters: " + e.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to bundle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these string was moved to bundle.
@@ -40,7 +40,7 @@ public GetOAuthAccessTokenAction(OAuth2Profile target) { | |||
public void actionPerformed(ActionEvent event) { | |||
try { | |||
getOAuthClientFacade().requestAccessToken(target); | |||
} catch (InvalidOAuth2ParametersException e) { | |||
} catch (InvalidOAuthParametersException e) { | |||
UISupport.showErrorMessage("Invalid OAuth 2 parameters: " + e.getMessage()); | |||
} catch (Exception e) { | |||
SoapUI.logError(e, "Error retrieving OAuth 2 access token"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same here.
@@ -40,7 +40,7 @@ public RefreshOAuthAccessTokenAction(OAuth2Profile profile) { | |||
public void actionPerformed(ActionEvent event) { | |||
try { | |||
getOAuthClientFacade().refreshAccessToken(profile); | |||
} catch (InvalidOAuth2ParametersException e) { | |||
} catch (InvalidOAuthParametersException e) { | |||
UISupport.showErrorMessage("Invalid OAuth2 parameters: " + e.getMessage()); | |||
} catch (Exception e) { | |||
SoapUI.logError(e, "Error refreshing OAuth 2 access token"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here.
@@ -33,6 +33,7 @@ | |||
|
|||
private WebViewBasedBrowserComponent browserComponent; | |||
private JFrame popupWindow; | |||
private boolean modal = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this variable? It has a setter and this setter is called somewhere, but I don't see how it affects anything in this class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option was deleted.
return; | ||
} | ||
if (getOAuth1ProfileContainer().getOAuth1ProfileNameList().contains(profileName)) { | ||
UISupport.showErrorMessage("There is already a profile named '" + profileName + "'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to bundle.
if (!CredentialsConfig.AuthType.O_AUTH_2_0.equals(authType)) { | ||
authTypeEnum = CredentialsConfig.AuthType.O_AUTH_2_0; | ||
} else if (CredentialsConfig.AuthType.O_AUTH_1_0.toString().equals(authType)) { | ||
profileName = dialog.getValue(AuthorizationTypeForm.OAUTH2_PROFILE_NAME_FIELD); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove 2 from the field name? Looks confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed.
…es. Moving string constants to bundle.
https://smartbear.atlassian.net/browse/SOAPUIOS-194