File tree Expand file tree Collapse file tree
src/corelib/Providers/Rackspace Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -994,7 +994,12 @@ protected virtual Task<Uri> GetBaseUriAsync(CancellationToken cancellationToken)
994994 /// <preliminary/>
995995 protected virtual Task < Tuple < IdentityToken , Uri > > AuthenticateServiceAsync ( CancellationToken cancellationToken )
996996 {
997- Task < IdentityToken > authenticate = Task . Factory . StartNew ( ( ) => IdentityProvider . GetToken ( GetDefaultIdentity ( null ) ) ) ;
997+ Task < IdentityToken > authenticate ;
998+ IIdentityService identityService = IdentityProvider as IIdentityService ;
999+ if ( identityService != null )
1000+ authenticate = identityService . GetTokenAsync ( GetDefaultIdentity ( null ) , cancellationToken ) ;
1001+ else
1002+ authenticate = Task . Factory . StartNew ( ( ) => IdentityProvider . GetToken ( GetDefaultIdentity ( null ) ) ) ;
9981003
9991004 Func < Task < IdentityToken > , Task < Tuple < IdentityToken , Uri > > > getBaseUri =
10001005 task =>
You can’t perform that action at this time.
0 commit comments