How to use userAuthenticationService

Describe Your Question

I have created a user management module including login/logout.
Now I’m going to integrate with the ohif viewer. After login, the ohif viewer is transferred and I can get access_token and refresh_token of login user at ohif viewer.

Can I use ohif viewer’s userAuthenticationService and then add access_token and refresh_token to it, then use it to verify each call something?

I’d appreciate it if anybody helps to do this.
Thanks,

Yes you can do all of that, take a look at the places in the code that we use

userAuthenticationService.setServiceImplementation({
    getAuthorizationHeader: () => ({
      Authorization: 'Bearer ' + token,
    }),
  });

@alireza Thank you so much! I’m going to look at it!