Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

Using an encrypted string for a password to a dynamically created(transient?) rest host

$
0
0

Trying to figure out if there's a way to do this without creating a custom plugin, but effectively I want to create a RestHost dynamically in the code, the call requires Basic Authentication so I'd like to store the credentials in a configuration element as an encrypted string. Unfortunately it does not appear possible as the RESTAuthenticationManager creates the authentication header using strings.

 

Create the restHost

var restHost = RESTHostManager.createHost("SomeName"); httpRestHost = RESTHostManager.createTransientHostFrom(restHost);

 

Apply Authentication

var authParams = ['Shared Session', user, password]; var authenticationObject = RESTAuthenticationManager.createAuthentication('Basic', authParams); httpRestHost.authentication = authenticationObject;

 

This works with valid user/password, however there seems to be no way to pass an encrypted string as the password instead.

 

Has anyone been able to achieve this?


Viewing all articles
Browse latest Browse all 179681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>