Skip to content
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

Merged
merged 3 commits into from Nov 18, 2016
Merged

Conversation

pavel-shelentsov
Copy link
Contributor

@IlyaAvdeev
Copy link
Contributor

@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());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to bundle.

Copy link
Contributor Author

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");
Copy link
Contributor

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");
Copy link
Contributor

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;
Copy link
Contributor

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.

Copy link
Contributor Author

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 + "'");
Copy link
Contributor

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);
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed.

@antone-sb antone-sb merged commit 4b0c849 into next Nov 18, 2016
@antone-sb antone-sb deleted the SOAPUIOS-194-Add-OAuth1-support branch November 18, 2016 10:05
@pavel-shelentsov pavel-shelentsov changed the title Adding OAuth 1 support. SOAPUIOS-194-Adding OAuth 1 support. Nov 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants