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

Fix #1684: Update Client and Admin Console #1685

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

jnpsk
Copy link
Collaborator

@jnpsk jnpsk commented Sep 30, 2024

Update PA Admin Console and PA Client to reflect changes in Callback Management API (3 new attributes).

Copy link
Member

@romanstrobl romanstrobl left a comment

Choose a reason for hiding this comment

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

In general looks OK, but in my opinion we should not use a GET REST API method for modifying data.

final UpdateCallbackUrlRequest request = new UpdateCallbackUrlRequest();
request.setId(id);
request.setApplicationId(applicationId);
request.setName(name);
request.setType(type.toString());
Copy link
Member

Choose a reason for hiding this comment

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

🤔 Why is type a type of String instead of Enum? I know, we should solve this in a separate PR if agreed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was thinking about that too, but I didn't want to include this type of change in this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -157,7 +160,7 @@ public String applicationVersionCreate(@PathVariable("applicationId") String id,
* @param model Model with passed parameters.
* @return "callbackCreate" view.
*/
@GetMapping("/application/detail/{applicationId}/callback/create")
@GetMapping("/application/detail/{applicationId}/callback/create/form")
Copy link
Member

Choose a reason for hiding this comment

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

Changing URL is not backward compatible but for Admin API we may afford that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I think we can assume those are just called internally.

* @return Information about new callback URL object.
* @throws PowerAuthClientException In case REST API call fails.
*/
CreateCallbackUrlResponse createCallbackUrl(String applicationId, String name, CallbackUrlType type, String callbackUrl, List<String> attributes, HttpAuthenticationPrivate authentication) throws PowerAuthClientException;
CreateCallbackUrlResponse createCallbackUrl(String applicationId, String name, CallbackUrlType type, String callbackUrl, List<String> attributes, HttpAuthenticationPrivate authentication, Duration retentionPeriod, Duration initialBackoff, Integer maxAttempts) throws PowerAuthClientException;
Copy link
Member

Choose a reason for hiding this comment

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

Carthago delenda est

In long term, I prefer using methods with request object only and mark these as deprecated.

Copy link
Member

@romanstrobl romanstrobl left a comment

Choose a reason for hiding this comment

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

Approved now.

@jnpsk jnpsk merged commit f8f6e72 into develop Oct 3, 2024
2 checks passed
@jnpsk jnpsk deleted the issues/1684-update-admin-console branch October 3, 2024 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants