Skip to content
Permalink
Browse files

Upgrade to v4.5.0

  • Loading branch information...
mythz committed Aug 30, 2016
1 parent e54f771 commit 3695a8a69d048e8f8cf4b25473aa35fe47df4e97
@@ -12,6 +12,7 @@ TestResults
*.suo
*.user
*.sln.docstates
.vs/

# Build results
[Dd]ebug/
@@ -51,10 +51,10 @@ public override void OnAuthenticated(IServiceBase authService, IAuthSession sess
}
}

var userAuthRepo = authService.TryResolve<IAuthRepository>();
if (AppHost.AppConfig.AdminUserNames.Contains(session.UserAuthName)
&& !session.HasRole(RoleNames.Admin))
&& !session.HasRole(RoleNames.Admin, userAuthRepo))
{
var userAuthRepo = authService.TryResolve<IAuthRepository>();
var userAuth = userAuthRepo.GetUserAuth(session, tokens);
userAuthRepo.AssignRoles(userAuth, roles: new[] { RoleNames.Admin });
}
@@ -8,32 +8,22 @@ namespace SocialBootstrapApi.ServiceInterface
{
public abstract class AppServiceBase : Service
{
public CustomUserSession UserSession
{
get
{
return SessionAs<CustomUserSession>();
}
}
public CustomUserSession UserSession => SessionAs<CustomUserSession>();

public ITwitterGateway TwitterGateway { get; set; } //Injected in IOC as defined in AppHost

ITwitterGateway authGateway;
private ITwitterGateway authGateway;
public ITwitterGateway AuthTwitterGateway
{
get
{
if (authGateway != null) return authGateway;

var authProvider = AuthenticateService.AuthProviders.FirstOrDefault(x => x is TwitterAuthProvider) as TwitterAuthProvider;
var oAuthTokens = UserSession.GetOAuthTokens(TwitterAuthProvider.Name);
if (authGateway != null)
return authGateway;

return authGateway = TwitterGateway.CreateAuthroizedGateway(
authProvider,
oAuthTokens != null ? oAuthTokens.AccessToken : null,
oAuthTokens != null ? oAuthTokens.AccessTokenSecret : null);
var authProvider = (TwitterAuthProvider)AuthenticateService.GetAuthProviders().First(x => x is TwitterAuthProvider);
var oAuthTokens = UserSession.GetAuthTokens(TwitterAuthProvider.Name);
return authGateway = TwitterGateway.CreateAuthroizedGateway(authProvider, oAuthTokens?.AccessToken, oAuthTokens?.AccessTokenSecret);
}
}

}
}
@@ -68,64 +68,65 @@
<HintPath>packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Npgsql, Version=3.0.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
<HintPath>packages\Npgsql.3.0.3\lib\net45\Npgsql.dll</HintPath>
<Reference Include="Npgsql, Version=3.1.7.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
<HintPath>packages\Npgsql.3.1.7\lib\net45\Npgsql.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=3.0.5797.27534, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>packages\NUnit.3.0.0\lib\net45\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.4.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack">
<HintPath>packages\ServiceStack.4.0.48\lib\net40\ServiceStack.dll</HintPath>
<Reference Include="ServiceStack, Version=4.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.4.5.0\lib\net45\ServiceStack.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.Api.Swagger, Version=4.0.48.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Api.Swagger.4.0.48\lib\net40\ServiceStack.Api.Swagger.dll</HintPath>
<Reference Include="ServiceStack.Api.Swagger, Version=4.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Api.Swagger.4.5.0\lib\net45\ServiceStack.Api.Swagger.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.Authentication.OpenId, Version=4.0.48.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Authentication.OpenId.4.0.48\lib\net40\ServiceStack.Authentication.OpenId.dll</HintPath>
<Reference Include="ServiceStack.Authentication.OpenId, Version=4.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Authentication.OpenId.4.5.0\lib\net45\ServiceStack.Authentication.OpenId.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>packages\ServiceStack.Client.4.0.48\lib\net40\ServiceStack.Client.dll</HintPath>
<Reference Include="ServiceStack.Client, Version=4.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Client.4.5.0\lib\net45\ServiceStack.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>packages\ServiceStack.Common.4.0.48\lib\net40\ServiceStack.Common.dll</HintPath>
<Reference Include="ServiceStack.Common, Version=4.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Common.4.5.0\lib\net45\ServiceStack.Common.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.Interfaces, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Interfaces.4.0.48\lib\portable-wp80+sl5+net40+win8+monotouch+monoandroid+xamarin.ios10\ServiceStack.Interfaces.dll</HintPath>
<HintPath>packages\ServiceStack.Interfaces.4.5.0\lib\portable-wp80+sl5+net45+win8+wpa81+monotouch+monoandroid+xamarin.ios10\ServiceStack.Interfaces.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.Mvc, Version=4.0.48.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Mvc.4.0.48\lib\net40\ServiceStack.Mvc.dll</HintPath>
<Reference Include="ServiceStack.Mvc, Version=4.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Mvc.4.5.0\lib\net45\ServiceStack.Mvc.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.OrmLite, Version=4.0.48.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.OrmLite.4.0.48\lib\net45\ServiceStack.OrmLite.dll</HintPath>
<Reference Include="ServiceStack.OrmLite, Version=4.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.OrmLite.4.5.0\lib\net45\ServiceStack.OrmLite.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.OrmLite.PostgreSQL, Version=4.0.48.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.OrmLite.PostgreSQL.4.0.48\lib\net40\ServiceStack.OrmLite.PostgreSQL.dll</HintPath>
<Reference Include="ServiceStack.OrmLite.PostgreSQL, Version=4.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.OrmLite.PostgreSQL.4.5.0\lib\net45\ServiceStack.OrmLite.PostgreSQL.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.Redis, Version=4.0.48.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Redis.4.0.48\lib\net40\ServiceStack.Redis.dll</HintPath>
<Reference Include="ServiceStack.Redis, Version=4.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Redis.4.5.0\lib\net45\ServiceStack.Redis.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.Server, Version=4.0.48.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Server.4.0.48\lib\net45\ServiceStack.Server.dll</HintPath>
<Reference Include="ServiceStack.Server, Version=4.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Server.4.5.0\lib\net45\ServiceStack.Server.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.Text, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>packages\ServiceStack.Text.4.0.48\lib\net40\ServiceStack.Text.dll</HintPath>
<Reference Include="ServiceStack.Text, Version=4.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\ServiceStack.Text.4.5.0\lib\net45\ServiceStack.Text.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
@@ -100,7 +100,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
@@ -26,20 +26,20 @@
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.8.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="Npgsql" version="3.0.3" targetFramework="net45" />
<package id="NUnit" version="3.0.0" targetFramework="net45" />
<package id="ServiceStack" version="4.0.48" targetFramework="net45" />
<package id="ServiceStack.Api.Swagger" version="4.0.48" targetFramework="net45" />
<package id="ServiceStack.Authentication.OpenId" version="4.0.48" targetFramework="net45" />
<package id="ServiceStack.Client" version="4.0.48" targetFramework="net45" />
<package id="ServiceStack.Common" version="4.0.48" targetFramework="net45" />
<package id="ServiceStack.Interfaces" version="4.0.48" targetFramework="net45" />
<package id="ServiceStack.Mvc" version="4.0.48" targetFramework="net45" />
<package id="ServiceStack.OrmLite" version="4.0.48" targetFramework="net45" />
<package id="ServiceStack.OrmLite.PostgreSQL" version="4.0.48" targetFramework="net45" />
<package id="ServiceStack.Redis" version="4.0.48" targetFramework="net45" />
<package id="ServiceStack.Server" version="4.0.48" targetFramework="net45" />
<package id="ServiceStack.Text" version="4.0.48" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="Npgsql" version="3.1.7" targetFramework="net45" />
<package id="NUnit" version="3.4.1" targetFramework="net45" />
<package id="ServiceStack" version="4.5.0" targetFramework="net45" />
<package id="ServiceStack.Api.Swagger" version="4.5.0" targetFramework="net45" />
<package id="ServiceStack.Authentication.OpenId" version="4.5.0" targetFramework="net45" />
<package id="ServiceStack.Client" version="4.5.0" targetFramework="net45" />
<package id="ServiceStack.Common" version="4.5.0" targetFramework="net45" />
<package id="ServiceStack.Interfaces" version="4.5.0" targetFramework="net45" />
<package id="ServiceStack.Mvc" version="4.5.0" targetFramework="net45" />
<package id="ServiceStack.OrmLite" version="4.5.0" targetFramework="net45" />
<package id="ServiceStack.OrmLite.PostgreSQL" version="4.5.0" targetFramework="net45" />
<package id="ServiceStack.Redis" version="4.5.0" targetFramework="net45" />
<package id="ServiceStack.Server" version="4.5.0" targetFramework="net45" />
<package id="ServiceStack.Text" version="4.5.0" targetFramework="net45" />
<package id="WebGrease" version="1.6.0" targetFramework="net45" />
</packages>

0 comments on commit 3695a8a

Please sign in to comment.
You can’t perform that action at this time.