@@ -622,13 +622,60 @@ public void AddAuths(SSOTicketType ssott)
622
622
}
623
623
}
624
624
}
625
-
625
+
626
+ /// <summary>
627
+ /// Authenticate the specified user. By asynchronous or synchronous ways.
628
+ /// </summary>
629
+ /// <param name='msnticket'>
630
+ /// Msnticket.
631
+ /// </param>
632
+ /// <param name='onSuccess'>
633
+ /// Callback when the authentication was passed.
634
+ /// </param>
635
+ /// <param name='onError'>
636
+ /// Callback when the authentication encounts errors.
637
+ /// </param>
638
+ /// <exception cref='AuthenticationException'>
639
+ /// Is thrown when the authentication failed and the request is a synchronous request.
640
+ /// Or the <paramref name="onError"/> callback will be called.
641
+ /// If the username contains a wrong format, this exception will always thrown even the request is asynchronous.
642
+ /// Which will lead to applcation crash.
643
+ /// </exception>
644
+ /// <remarks>
645
+ /// The method is asynchronous only when both <paramref name="onSuccess"/> and <paramref name="onError"/> are not null.
646
+ /// Otherwise it will perform a synchronous request.
647
+ /// </remarks>
626
648
public void Authenticate ( MSNTicket msnticket , EventHandler onSuccess , EventHandler < ExceptionEventArgs > onError )
627
649
{
628
650
SecurityTokenService securService = CreateSecurityTokenService ( @"http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue" , @"HTTPS://login.live.com:443//RST2.srf" ) ;
629
651
Authenticate ( securService , msnticket , onSuccess , onError ) ;
630
652
}
631
-
653
+
654
+ /// <summary>
655
+ /// Authenticate the specified user. By asynchronous or synchronous ways.
656
+ /// </summary>
657
+ /// <param name='securService'>
658
+ /// The authentication webservice to invoke.
659
+ /// </param>
660
+ /// <param name='msnticket'>
661
+ /// Msnticket.
662
+ /// </param>
663
+ /// <param name='onSuccess'>
664
+ /// Callback when the authentication was passed.
665
+ /// </param>
666
+ /// <param name='onError'>
667
+ /// Callback when the authentication encounts errors.
668
+ /// </param>
669
+ /// <exception cref='AuthenticationException'>
670
+ /// Is thrown when the authentication failed and the request is a synchronous request.
671
+ /// Or the <paramref name="onError"/> callback will be called.
672
+ /// If the username contains a wrong format, this exception will always thrown even the request is asynchronous.
673
+ /// Which will lead to applcation crash.
674
+ /// </exception>
675
+ /// <remarks>
676
+ /// The method is asynchronous only when both <paramref name="onSuccess"/> and <paramref name="onError"/> are not null.
677
+ /// Otherwise it will perform a synchronous request.
678
+ /// </remarks>
632
679
public void Authenticate ( SecurityTokenService securService , MSNTicket msnticket , EventHandler onSuccess , EventHandler < ExceptionEventArgs > onError )
633
680
{
634
681
if ( user . Split ( '@' ) . Length > 1 )
0 commit comments