You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Credentials security using ROQL

Received Response
9
Views
5
Comments
edited Jun 16, 2017 4:31PM in UI Extensibility 5 comments

Content

Hi,

I made an AddIn using ROQL and it works OK but I need help to avoid hardcode credentials.

I looked for information on this but could not find anything related.

Thanks Regards.

Version

Service Cloud

Code Snippet

             string url = _globalContext.GetInterfaceServiceUrl(ConnectServiceType.Soap);
                EndpointAddress endpoint = new EndpointAddress(url);
                BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportWithMessageCredential);
                binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;

                binding.MaxReceivedMessageSize = 1024 * 1024;
                binding.MaxBufferSize = 1024 * 1024;
                binding.MessageEncoding = WSMessageEncoding.Mtom;

                _rightNowClient = new RightNowSyncPortClient(binding, endpoint);

                _rightNowClient.ClientCredentials.UserName.UserName = "USUARIO";
                _rightNowClient.ClientCredentials.UserName.Password = "USUARIOPASS"; 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!