In our BAP application we direct the user to paypal. After returning from paypal there should be no login if it isn’t required. So the idea is to get api/user/data to see if the user is still authenticated. But there are currently no actionsavailable to do just this as far as I could see. That’s why I wanted to use AuthenticationService.user (defined in @com.mgmtp.a12/user-api/lib/Authentication.service) to achieve this. But I don’t know how I can access the instance of AuthenticationService in my middleware.
EDIT:
I just found out that there exists PlatformServerConnectors.restoreAuthenticationState, but I don’t know how this should be used.