Register a device and log on a user using LogonCore and
SecureStore library calls.
Define the application and client password policy in SAP Mobile Platform Server
using the cockpit.
- Initialize the logonCore variable:
var logonCore = await
- Register the device by calling RegisterWithContextAsync.
This sends an HTTP POST request to the SAP Mobile Platform Server with a
payload to identify the device to the SAP Mobile Platform Server, which
then registers the device and sends back the registration information as part of
var logonContext = new SAP.Logon.Core.LogonContext
RegistrationContext = new SAP.Logon.Core.RegistrationContext
ApplicationId = “App Id", ServerHost = “IP Address Or Hostname", IsHttps = false,
ServerPort = 8080
- Persist locally all registration information received from
SAP Mobile Platform Server:
await logonCore.PersistRegistrationAsync(passcode, logonContext);
is an arbitrarily chosen password that is eligible
for the passcode policy sent back by the server.
- Store the application connection ID after logon:
var connectionId = logonCore.ApplicationSettings.ApplicationConnectionId;