cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Removal of authorizations definition from webservices

SAPSupport
Employee
Employee
0 Likes
317
Hi SAP Team.

We are working on upgrading hybris version to DIGITS. As per documentation provided on below link , we need to Remove the authorizations definition if it uses “oauth2_client_credentials” or “oauth2_password”.

What will be the replacement if we are removing the authorization tag as we have some secured api in our code which are client secret and password .

 

 Link -


Thanks,

Abhinav Mishra


------------------------------------------------------------------------------------------------------------------------------------------------
Learn more about the SAP Support user and program here.

Accepted Solutions (1)

Accepted Solutions (1)

SAPSupport
Employee
Employee

@ApiOperation(authorizations =
{@Authorization(value = "oauth2_client_credentials")}
...)

@ApiOperation(authorizations = {
@Authorization(value = "my_auth",
scopes = {@AuthorizationScope(scope = "scope1")})
}
)

The above to annotation should be replaced by following annotation

@Operation( security =
@SecurityRequirement(name = "my_auth", scopes = {"scope1"})
)

Here is an example:

@Operation(operationId = "removeScimGroup", summary = "Delete scim group from Commerce", description = "Endpoint to delete scim group from Commerce for which id is provided", security = @SecurityRequirement(name = "oauth", scopes = "oauth2_client_credentials"))

Thanks

Answers (0)