Autologin to spark with custom message

Hello all,

I have a script written in AutoIt that I intend to use to auto login a user into Spark when that user successfully logs into a medical application on a workstation (to prevent having to multiple login at the beginning of the day). The Spark login is easily accomplished using the command line parameters for username and password.

I also want to automatically set that user’s status message to reflect the named location and phone number where the user is sitting. For example, automatically set the user’s custom message to something like “MSK READING ROOM - 2-7945”

My AutoIt script can easily detect which location the user is at (based on computer name) and pass a string… but I find no command line option in Spark for passing an initial custom status message.

So, to point:

  1. Is there a command line option to set initial user status message at or after the time of login?

  2. If not, what is the easiest path I should take - just write a Sparkplug to detect the machine name and assign the Message string at startup based on that so that I don’t have to pass anything from my AutoIt script? I haven’t set up a development environment for Spark at this stage to create a plugin but will do so if necessary if there is no easier way to accomplish this.

Any advice is appreciated. I am new to spark programming but not programming in general.

Cheers,

WL

I want to implement single sign on facility to sparkweb.How can I implement this?

I had a web application.I want to login to sparkweb automatically when I login to my web application.

Please give any suggestions

Thanks in advance

aishu87 wrote:

I want to implement single sign on facility to sparkweb.How can I implement this?

I had a web application.I want to login to sparkweb automatically when I login to my web application.

Please give any suggestions

Thanks in advance

Hi,

In answer to your question of how to launch Spark on login to a web application, check out http://www.igniterealtime.org/community/docs/DOC-1090

Your web app could allow the user to login; check a (preferably encrypted) database for the user’s Spark username and password; and plug those in to the command line options available in the link above. Pay attention to the quotes, I think those are required in the command line. If you want to skip the database stuff, just make the webapp username and password the same as the Spark username and password.

Given the deafening lack of response on setting status via the command line, I take it that I cannot set status this way, so I’m writing a sparkplug to do it. I haven’t checked this or run it, but I was thinking something like…

import com.jivesoftware.spark.

SparkManager;
import com.jivesoftware.spark.Workspace;
import com.jivesoftware.spark.plugin.Plugin;
import us.ihmc.mast.platapi.SysUtils

public class myplugin implements Plugin {

 public void initialize() {

// Create new Presence with Machine name

    Sysutils  Util = new SysUtils
     String Description = new String
    Description =  Util.GetComputerDescription()

Presence p = new Presence(Presence.Type.available, Description, 5, Presence.Mode.available);
connection.sendPacket(p);
SparkManager.getSessionManager().changePresence(p)

}
}

Any Java wizards have any thoughts? I haven’t written in Java since its early days of development so my syntax is likely buggy. The computer description has the string that I want to use in the computer status.