How to set username in ETA

Shuki
Shuki Newcomer
edited January 2 in ETA

I am developing using ETA,

I used tutorial 4 code and managed to get a view of several RICs ,

Now I am required to get data from a different service which requires a user

I saw in one answer for a different question ,

they say to set loginRequest.userName after rsslInitDefaultRDMLoginRequest using a setString function,

I did this after the call to rsslClearOMMConsumerRole just before :

consumerRole.pLoginRequest = &loginRequest;

but I still get "Access Denied: User req to IDN for Exch .."

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @Shuki

    Thank you for reaching out to us.

    The username is in the login request message. You can set it in the loginRequest.userName.

    /* Initialize the default login request(Use 1 as the Login Stream ID). */
    	if (rsslInitDefaultRDMLoginRequest(&loginRequest, 1) != RSSL_RET_SUCCESS)
    	{
    		printf("rsslInitDefaultRDMLoginRequest() failed\n");
    		cleanUpAndExit(-1);
    	}
    	
    	/* If a username was specified, change username on login request. */
    	if (userName.length)
    		loginRequest.userName = userName;
    

    This error (Access Denied: User req to IDN for Exch ..) indicates that the username doesn't have permission to access the subscribed RIC. You need to contact the server team to verify the permission.

    Moreover, you can also check the code in the VAConsumer example in the RTSDK package or run the example to verfiy what the problem is.