File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,5 +7,12 @@ namespace Saleslogix.SData.Client.Framework
77 public interface IAuthenticator
88 {
99 void Authenticate ( WebRequest request ) ;
10+ UnauthorizedAction Unauthorized ( WebResponse response ) ;
11+ }
12+
13+ public enum UnauthorizedAction
14+ {
15+ Throw ,
16+ Retry
1017 }
1118}
Original file line number Diff line number Diff line change @@ -215,6 +215,12 @@ public virtual SDataResponse GetResponse()
215215 attempts -- ;
216216 continue ;
217217 }
218+ if ( ex . Status == WebExceptionStatus . ProtocolError &&
219+ ( ( HttpWebResponse ) ex . Response ) . StatusCode == HttpStatusCode . Unauthorized &&
220+ Authenticator != null && Authenticator . Unauthorized ( ex . Response ) == UnauthorizedAction . Retry )
221+ {
222+ continue ;
223+ }
218224 throw new SDataException ( ex ) ;
219225 }
220226
Original file line number Diff line number Diff line change 2626// by using the '*' as shown below:
2727
2828[ assembly: AssemblyVersion ( "2.0" ) ]
29- [ assembly: AssemblyFileVersion ( "2.0.1.1562 " ) ]
29+ [ assembly: AssemblyFileVersion ( "2.0.2.1563 " ) ]
3030[ assembly: NeutralResourcesLanguage ( "en-US" ) ]
3131[ assembly: AssemblyInformationalVersion ( "2.0" ) ]
3232[ assembly: InternalsVisibleTo ( "Saleslogix.SData.Client.Test, PublicKey=" +
You can’t perform that action at this time.
0 commit comments