HPE Morpheus Enterprise
1837897 Members
3288 Online
110123 Solutions
New Discussion

Refresh token in morpheus plugin

 
umeshverma
Occasional Advisor

Refresh token in morpheus plugin

Hello Experts,

  • I am working on the generic plugin integration, And in this plugin I want to get the /api/servers information.
  • Generic integration plugin will get these data through morh-api so it needs to pass the refresh-token. can you suggest me how to get this token if I already logged in morheus ui?

Thanks,

4 REPLIES 4
cbunge
HPE Pro

Re: Refresh token in morpheus plugin

After you have generated a token, you cannot at a later time retrieve the refresh-token per my understanding. Now, I have created the Morpheus Uplink plugin that utilizes Morpheus credentials and does OAuth to query Morpheus API endpoints. This may help you.

More specifically, look at the login method within this file.

umeshverma
Occasional Advisor

Re: Refresh token in morpheus plugin

Hi @cbunge, I tried above approach and its working but I need one more enhancement to this flow.
For example: I don’t want to get the credentials from Infrastructure → Trust → UserName & Password. IF I am already logged in through the Morpheus UI, So I want only token to communicate morpheus api. Please suggest me how to achieve this.

Thanks,
Umesh

umeshverma
Occasional Advisor

Re: Refresh token in morpheus plugin

Thanks @cbunge , let me try this.

umeshverma
Occasional Advisor

Re: Refresh token in morpheus plugin

(post deleted by author)