eclipse-basyx / basyx-java-server-sdk

MIT License
55 stars 45 forks source link

Fixes token retrieval mechanism issue in Authorized version of Connected client versions in AAS/SM Service #366

Closed mdanish98 closed 2 months ago

mdanish98 commented 2 months ago

Description of Changes

This PR addresses the same fix applied by #355 but in AAS and SM service.

The Authorized versions of clients for AAS/SM Service was using wrong mechanism to retrieve access tokens, because of this wrong behavior, new token was not getting retrieved once the initial token was expired.

This PR removes the one-time addition of the Authorization header at the time of instantiation of AuthorizedConnected*, and pass the TokenManager directly to the APIs, so that token can be requested each time and not use a single token for each request.