Please note that you need to change following configuration in above code, you can also user properties from configuration file if available in your application:
MyORSId: ORS Id which application is using.
MyUserName Name of user which you want to authenticate, this user need to exists on MDM Hub
MyPassword Password of user matching in MDM Hub.
MyApplicationName Host on which MDM Hub is running.
MyAppPort Port on which MDM Hub is running.