Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  IBM Sametime Forum

IBM Sametime Forum

developerWorks

  

PreviousPrevious NextNext


Peter Gerritsen 18.Sep.03 09:28 AM a Web browser
Sametime Developers Toolkit All Releases Windows NT/2000


I created an applet based on the LiveNames example. In this applet I now use a login by username and password.
Because I want to use a user's Notes login in the applet (Single Sign On) I need to retrieve a login token based on the Notes username. How do I do this. So far I tried to resolve a user by username then use the STuser retrieved from that to get a token. But this doesn't work as it that you need to be logged in to resolve a user. The code I have so far:

public void init() {
try
{
m_session = new STSession("LiveNamesApplet " + this);
m_session.loadAllComponents();
m_session.start();

setLayout(new BorderLayout());
m_awarenessList = new AwarenessList(m_session, true);
add(m_awarenessList, BorderLayout.CENTER);

m_names = (NamesService) m_session.getCompApi(NamesService.COMP_NAME);
m_names.addNamesServiceListener(this);

m_token = (TokenService) m_session.getCompApi(TokenService.COMP_NAME);
m_token.addTokenServiceListener(this);

m_lookup = (LookupService) m_session.getCompApi(LookupService.COMP_NAME);

m_resolver = m_lookup.createResolver(false, // Return all matches.
false, // Non-exhaustive lookup.
true, // Return resolved users.
false); // Do not return resolved groups.

m_resolver.addResolveListener(this);

System.out.println("Resolving user");
m_resolver.resolve("Peter Gerritsen");
}
catch(DuplicateObjectException e)
{
e.printStackTrace();
}
}

public void resolved(ResolveEvent event)
{
STUser tempUser;
tempUser = (STUser) event.getResolved();

if (m_comm.isLoggedIn()) {
System.out.println("Resolved user will be added");
m_awarenessList.addUser(tempUser);
}
else {
System.out.println("Token for resolved user will be added");
m_token.generateToken();
}
}

public void tokenGenerated(TokenEvent event) {
System.out.println("Token generated");
m_comm.loginByToken("sametime.aedificomm.net",
event.getToken().getLoginName(),
event.getToken().getTokenString());
}

public void generateTokenFailed(TokenEvent event) {
System.out.println("Token generation failed");
}






Get a login token for login through... (Peter Gerritsen... 18.Sep.03)
. . RE: Get a login token for login thr... (Marco Fabbri 18.Sep.03)
. . . . RE: Get a login token for login thr... (Peter Gerritsen... 19.Sep.03)
. . . . . . RE: Get a login token for login thr... (Peter Gerritsen... 19.Sep.03)
. . . . . . . . RE: Get a login token for login thr... (Marco Fabbri 22.Sep.03)
. . . . . . . . RE: Get a login token for login thr... (sandeep thiruma... 10.Nov.03)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite