diagnostic changes.

Trying to work out why for osx it doesn't work
pull/1425/head
tidusjar 8 years ago
parent 47bcb83a27
commit 539419750b

@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<RuntimeIdentifiers>win10-x64;osx.10.12-x64;ubuntu.16.10-x64;debian.8-x64;</RuntimeIdentifiers>
<PackageTargetFallback>portable-net45+win8</PackageTargetFallback>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>
@ -11,9 +11,6 @@
<Content Include="wwwroot\**" />
</ItemGroup>
<ItemGroup>
<None Include="Startup.Auth.cs" />
</ItemGroup>
<ItemGroup>
@ -45,24 +42,4 @@
<ProjectReference Include="..\Ombi.Settings\Ombi.Settings.csproj" />
<ProjectReference Include="..\Ombi.TheMovieDbApi\Ombi.Api.TheMovieDb.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Configuration">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Configuration.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="Models\Plex\" />
<Folder Include="wwwroot\css\fonts\" />
</ItemGroup>
<ItemGroup>
<Content Update="wwwroot\app\landingpage\landingpage.component.html">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Update="wwwroot\app\services\request - Copy.service.js.map">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
</Project>

@ -11,6 +11,7 @@ namespace Ombi
{
public static void Main(string[] args)
{
Console.WriteLine(Directory.GetCurrentDirectory());
Console.Title = "Ombi";
var host = new WebHostBuilder()
.UseKestrel()

@ -20,13 +20,13 @@ namespace Ombi
private void ConfigureAuth(IApplicationBuilder app)
{
var signingKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(Configuration.GetSection("TokenAuthentication:SecretKey").Value));
var signingKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes("secretkey_secretkey123!"));
var tokenProviderOptions = new TokenProviderOptions
{
Path = Configuration.GetSection("TokenAuthentication:TokenPath").Value,
Audience = Configuration.GetSection("TokenAuthentication:Audience").Value,
Issuer = Configuration.GetSection("TokenAuthentication:Issuer").Value,
Path = "/api/v1/token/",
Audience = "DemoAudience",
Issuer = "DemoIssuer",
SigningCredentials = new SigningCredentials(signingKey, SecurityAlgorithms.HmacSha256),
IdentityResolver = GetIdentity
};
@ -38,10 +38,10 @@ namespace Ombi
IssuerSigningKey = signingKey,
// Validate the JWT Issuer (iss) claim
ValidateIssuer = true,
ValidIssuer = Configuration.GetSection("TokenAuthentication:Issuer").Value,
ValidIssuer = "DemoIssuer",
// Validate the JWT Audience (aud) claim
ValidateAudience = true,
ValidAudience = Configuration.GetSection("TokenAuthentication:Audience").Value,
ValidAudience = "DemoAudience",
// Validate the token expiry
ValidateLifetime = true,
// If you want to allow a certain amount of clock drift, set that here:
@ -61,14 +61,6 @@ namespace Ombi
private async Task<ClaimsIdentity> GetIdentity(string username, string password, IUserIdentityManager userIdentityManager)
{
//await userIdentityManager.CreateUser(new UserDto
//{
// Username = "a",
// Password = "a",
// Claims = new List<Claim>() { new Claim(ClaimTypes.Role, "Admin")},
// UserType = UserType.LocalUser,
//});
var validLogin = await userIdentityManager.CredentialsValid(username, password);
if (!validLogin)
{

@ -1,5 +1,4 @@
using System;
using System.Configuration;
using System.Security.Principal;
using AutoMapper;
using AutoMapper.EquivalencyExpression;
@ -23,6 +22,7 @@ namespace Ombi
{
public Startup(IHostingEnvironment env)
{
Console.WriteLine(env.ContentRootPath);
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", false, true)
@ -68,11 +68,6 @@ namespace Ombi
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
}
app.UseHangfireServer();
app.UseHangfireDashboard();
@ -84,13 +79,13 @@ namespace Ombi
ConfigureAuth(app);
var provider = new FileExtensionContentTypeProvider();
provider.Mappings[".map"] = "application/octet-stream";
//var provider = new FileExtensionContentTypeProvider();
//provider.Mappings[".map"] = "application/octet-stream";
app.UseStaticFiles(new StaticFileOptions()
{
ContentTypeProvider = provider
});
//app.UseStaticFiles(new StaticFileOptions()
//{
// ContentTypeProvider = provider
//});
app.UseMvc(routes =>
{

Loading…
Cancel
Save