Name | Description |
---|---|
Action | com.zebra.dfs.ACTION_LOGIN |
Intent Type | broadcast |
Extra 0 | This extra specifies the username. This is a mandatory parameter if the login_info parameter is not included. |
Type | String |
Name | user_name |
Value | Username with domain (i.e. sample.user@domain ) |
Extra 1 | This extra specifies the user password. This is a mandatory parameter if the login_info parameter is not included. |
Type | String |
Name | user_pwd |
Value | User password |
Extra 2 | This extra specifies if the JSON login information is encrypted. This is an optional parameter. |
Type | Boolean |
Name | json_encrypted |
Value | True indicates the login information is encrypted. False or absent indicates the information is not encrypted. |
Extra 3 | This extra login_info specifies the JSON login information. See below for the payload definition. This extra may or may not be encrypted. |
Extra 3 - sent unencrypted | This extra specifies the JSON login information when not encrypted. This is an optional parameter. |
Type | String |
Name | login_info |
Value | String in JSON format |
Extra 3 – sent encrypted | This extra specifies the JSON login information when encrypted. This is an optional parameter. |
Type | Byte array |
Name | login_info |
Value | See code snippet |
adb shell am broadcast -a com.zebra.dfs.ACTION_LOGIN --es user_name --es user_pwd --es <other login parameters>
adb shell am broadcast -a com.zebra.dfs.ACTION_LOGIN –es json_encrypted false --es login_info {user_name:sample.user@domain, user_pwd:<password>}
{ "user_name": "username", //mandatory "user_pwd": "userpwd", //mandatory "user_accesscode": "xxxxxxxx", //optional; access token from IDP. "site_id": "xxxxxx", //optional; client uses most recent- // site_id received. "refresh_token": "xxxxx", //optional; specifies- //refresh token. "refresh_token_expiration": "xxxxxx", //optional; specifies expiration // of refresh token. "request_id": <unique id for the request>, //optional; required if a //response is desired. "package": "<third_party_package_name>" //optional; required if a //response is desired. }
String plainText = "This is a plain text which needs to be encrypted!"; String aad = "These are additional authenticated data (optional)"; String secret_key = "5ecded3e-9562-11ea-bb37-0242ac130002"; // UUID // Encryption AesGcmJce agjEncryption = new AesGcmJce(secret_key.getBytes()); byte[] encrypted = agjEncryption.encrypt(plainText.getBytes(), aad.getBytes()); // Decryption AesGcmJce agjDecryption = new AesGcmJce(secret_key.getBytes()); byte[] decrypted = agjDecryption.decrypt(encrypted, aad.getBytes());