cancel
Showing results for 
Search instead for 
Did you mean: 

Obtain Login Information from SUP

Former Member
0 Kudos

Hellow Guys,

There are something important about SUP that is the offline Loggin.

I want to obtain all users name and passwords but i dont know how to do it.

Is is possible? How do you do the offline Login?

Thanks in Advance

Laguerta

Accepted Solutions (0)

Answers (1)

Answers (1)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Daniel,

In general, for offline based apps, you should first download whole/required data on the device(s) against respective user(s) , so that if there is no network, user can perform transactions being in offline mode (those transactions will go and add into device's pending items queue) and once there is internet connection available, all pending items will get start synchronizing with back-end.

There is a way to store username and password into client local database maybe data vault.


I want to obtain all users name and passwords but i dont know how to do it.

What exactly is your requirement in above statement? Can only one user login to one device or are you allowing more than one user to login to the same device?

Regards,

JK

Former Member
0 Kudos

Hellow Jitendra,

My request is to obtain the SCC login information.

In SCC>security we define the users, I want that data to store it in the device database.

because I want the app authentication Equals to Sup Authentication.

is there any way to do this?

Best Regards!

Laguerta

midhun_vp
Active Contributor
0 Kudos

Hi Daniel,

You can use the offlineLogin API if you want to login to app when there is no connectivity.

For the first time the user should log in with internet connectivity, thereafter if there is no network you can call offline login API.

Ex.

//If there is no connectivity

try {

  ConnectionProperties connProps = app.getConnectionProperties();

  connProps.setFarmId("0");

  connProps.setServerName("10.10.10.10");

  connProps.setPortNumber(5001);// MBS

  ReaderDB.setApplication(app);

  LoginCredentials loginCredentials = new LoginCredentials(

  "Midhun","123456");

  connProps.setLoginCredentials(loginCredentials);

  ReaderDB.offlineLogin(ReaderDB.getPersonalizationParameters().getUsername(), ReaderDB.getPersonalizationParameters().getPassword());

  } catch (Exception e) {

  returnMsg = e.getMessage();

  }

After first Login you can save the credentials in Android sharedpreference.

Regards,

Midhun VP

Former Member
0 Kudos

Hello Midhun!

I Like you answer because I have implemented a offline System that works similar to that offline API.

Its a Time Saver. What I did was to create an Local MBO that saves the User and Password so everytime the user syncs I Update the Local MBO.

In this way I also able to LoginOffline with the last successful Login.

the problem and maybe the reason that that method is deprecated is that if the SUP password changes I'll be able to login with old password.

But thinking twice, this problem may be unsolvable right?

Because I need internet to get credentials.

Best Regards,

Laguerta

midhun_vp
Active Contributor
0 Kudos

Hi Daniel,

If the device is offline the transactions are queued, I believe that if the password is expired, when the device comes online the transactions fails.

Regards, Midhun

SAP Customer Experience Group - CEG

Former Member
0 Kudos

Hellow Midhun!

That would be the safer behaviour.

I may try it soon,

Thanks a Lot!

Laguerta