With the new release of the Service SDK, we added further support for easier authorization, fixed some bugs, and updated Maven dependencies. Please make sure your Maven dependency versions are not in conflict with Service SDK versions after the update.
Enabled generated client to use the new OAuth 2.0 Jersey Filter with the same client instance
You can now override the AuthorizationScope
used by the OAuth2 Jersey Filter on a request basis. To do this, set a RequestProperty
with the key OAuth2Filter.PROPERTY_AUTHORIZATION_SCOPE
and the desired AuthorizationScope
as the value anywhere in your client invocation call chain:
return documentClient
.tenant(tenant)
.client(CLIENT_NAME)
.dataType(DATA_TYPE)
.prepareGet()
.withRequestProperty(OAuth2Filter.PROPERTY_AUTHORIZATION_SCOPE, new AuthorizationScope(tenant, SCOPES))
.execute();
With this new functionality, you can reuse the same generated client instance for making calls that are authorized with a different AuthorizationScope
.
Maven dependencies updated
Maven dependencies have been updated to the latest ones, including updating the Jersey library to version 2.22.2 and Spring dependencies to version 4.2.5.RELEASE. Please check your Maven dependency tree and update the versions in order to eliminate possible version conflicts.
Bug fixes
We fixed the problem of the API Console throwing a NullPointerException
error when requesting a non-existing resource. We also improved the confusing JavaDoc of the RamlRewriterFilter.setTraitMappings()
method, which was not in sync with the implementation.
If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.
Use our private help channel. Receive updates over email and contact our specialists directly.
If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.