Forums
« Back to APIs

How to do single sign on with Jabber SDK

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hello,
 
I want to add a Jabber SDK CWIC API on our portal for voice/video calls. Portal users don't want to log into Jabber SDK phone again after users are authenticated on the portal.
And, the portal user can make the call with user's directory number. How to do the Single-Sign On feature on the Jabber SDK? Please advise.
Thank you!
 
Andy

Hi Andy,
The CWIC registerPhone function allows unauthenticated registrations by passing "authenticate: false" and "password: ''". Setting the authenticate flag to false basically means "bypass authentication if password is empty". This code registers myuser with device ECPmyuser to CUCM address 1.2.3.4 without authentication:
jQuery('#phone').cwic('registerPhone', { user: 'myuser', password: '', cucm: '1.2.3.4', authenticate: false });
Hope this replies to your question, Thomas

Hello Thomas,
Thanks for your helping.
Andy

Hello Thomas,
 
We modified the code sample.html from Jabber SDK.
But we got the error message "Unable to login: Login Error eNoLocalIpConfigured".
I don't know how to fix it.
Do you have any idea for error message ?
Thank you!
Andy
 
....
 
        $('#phonecontainer').cwic('registerPhone', {
            user: user,
            //password: password,
password: '',
            cucm: {
                tftp: (cucm || '').split(','),
                ccmcip: (cucm || '').split(',')
            },
mode: phoneMode,
            //authenticate: auth,
authenticate: false,
....

Hi Andy,
Can you successfully register (same user/CUCM) after authenticating using the original sample.html ?
The original sample.html supports unauthenticated registration: just enter the user name and CUCM address and click Login, does it work ? If not, is the CUCM host name resolvable from the client machine ? You can try "ping <cucm>" from a command prompt. Feel free to send you log file (C:\Users\<userid>\AppData\Local\softphone.log) to jabbersdk-support@cisco.com
Thanks, Thomas

Hi Thomas,
 
You were right. userID with "." for instance return the previous error mentionned by Andy.
I had the same issue and changed for a username with only alphanumeric and it works fine.
 
However it works only for softphone mode. When I select Deskphone and clic on the login button it returns me another error:
Unable to login: No credentials configured eNoCredentialsConfigured
 
Any idea ?
Regards
 
Fabian

Hi Fabian,
Good point, I forgot to mention unauthenticated registration is supported in softphone mode only, deskphone mode requires a valid user and password as per CUCM APIs.
Suggested workaround: prompt the user for password, and store it encrypted for subsequent registrations. The registration.password passed to the success callback of registerPhone contains the encrypted password and can be used as-is for future calls to registerPhone.
Thanks, Thomas

Hi Thomas,
The command "ping <cucm>"  and the authenticated regstration with same user is work.
But, The unauthenticated registration is failed.
I has sent the file softphone.log to jabbersdk-support@cisco.com.
Please help.
Thank you!
Andy

Hello Thomas,
I found the device name is misconfigured. I change to the device name "ECPusername" and it's work fine.
Thanks for your help!!
Andy