javascript - Skype Web SDK - Maintain a user session -


i using skype web sdk user's contact list in following manner.

skype.initialize({                  apikey: 'a42fcebd-5b43-4b89-a065-74450fb91255',                  }, function (api) {                         var application = api.application;                         var client = new application();                         client.signinmanager.signin({                             username: sip,                             password: pwd                         }) 

this works fine when provide username(sip) , password. however, when reload page, have provide credentials again because app re-initializes. there way maintain user's sessions while after initial login page refreshes wouldn't need ask credentials again?

i have looked through samples , docuementation microsoft has , couldn't find way. i've tried store client object in localstorage after initialization , sign in, when tried reuse object localstorage contact list, did not work.

http://officedev.github.io/skype-docs/skype/websdk/model/api/interfaces/jcafe.signinmanager.html#signin last example explains can store oauth token , use unexpired token.

to connect existing app's event channel, specify id of app:

sm.signin({      username: "user1@company.com",      password: "password1",      id: "273867-234235-45346345634-345"  });

to sign in skype business online using oauth while handling logic of retrieving oauth tokens yourself:

 sm.signin({   client_id: '123-456',   origins: [ 'https://webdir.online.lync.com/autodiscover/autodiscoverservice.svc/root' ],   cors: true,   get_oauth_token: function(resource) {       // return valid unexpired token specified resource if have one.       // else, return promise , resolve once have obtained token.       return 'bearer eyj0e...';   }   });


Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -