|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jp.windows.live.LogonManager
public class LogonManager
This class provides ability to logon to the Windows Live ID service and obtain SecurityToken.
Sample usage is as follows:
try
{
SecurityToken securityToken = new LogonManager().logon("live.com", "user", "password");
System.out.println("Logon succeeded!");
System.out.println("Passport Token: " + securityToken.getBinarySecurityToken());
System.out.println("Issue Date: " + securityToken.getIssueDate());
System.out.println("Expire Date: " + securityToken.getExpireDate());
}
catch (LogonManagerException lme)
{
System.out.println("Logon failed: "+lme.getDetailedMessage());
}
catch (Exception ex)
{
ex.printStackTrace();
}
Constructor Summary | |
---|---|
LogonManager()
Creates a new instance of the LogonManager and initializes it with default Windows Live ID service url ( https://dev.login.live.com/wstlogin.srf ) |
|
LogonManager(java.lang.String anURL)
Creates a new instance of the LogonManager |
Method Summary | |
---|---|
SecurityToken |
logon(java.lang.String anEndpointReference,
java.lang.String aUserName,
java.lang.String aPassword)
Logons to the Windows Live ID and returns SecurityToken if logon succeeded. |
SecurityToken |
logon(java.lang.String anEndpointReference,
java.lang.String aUserName,
java.lang.String aPassword,
java.lang.String anApplicationID)
Logons to the Windows Live ID and returns SecurityToken if logon succeeded. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogonManager()
https://dev.login.live.com/wstlogin.srf
)
public LogonManager(java.lang.String anURL)
anURL
- Windows Live ID service urlMethod Detail |
---|
public SecurityToken logon(java.lang.String anEndpointReference, java.lang.String aUserName, java.lang.String aPassword) throws LogonManagerException, java.io.IOException, SOAPException
logon(anEndpointReference, aUserName, aPassword, anApplicationID)
method
and passes empty string as anApplicationID
anEndpointReference
- address of the partner site that is eligible to utilize Windows Live ID. It is possible to
use live.com
address for testing purposes.aUserName
- user nameaPassword
- user password
LogonManagerException
- if logon failed
SOAPException
- for any SOAP related error
java.io.IOException
- if there is a problem in reading SOAP message from the input streampublic SecurityToken logon(java.lang.String anEndpointReference, java.lang.String aUserName, java.lang.String aPassword, java.lang.String anApplicationID) throws LogonManagerException, SOAPException, java.io.IOException
anEndpointReference
- address of the partner site that is eligible to utilize Windows Live ID. It is possible to
use live.com
address for testing purposes.aUserName
- user nameaPassword
- user passwordanApplicationID
- name that identifies particular application. Can be string of any value.
LogonManagerException
- if logon failed
SOAPException
- for any SOAP related error
java.io.IOException
- if there is a problem in reading SOAP message from the input streampublic static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |