mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
diagnostic changes.
Trying to work out why for osx it doesn't work
This commit is contained in:
parent
47bcb83a27
commit
539419750b
4 changed files with 15 additions and 50 deletions
|
@ -3,7 +3,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
<RuntimeIdentifiers>win10-x64;osx.10.12-x64;ubuntu.16.10-x64;debian.8-x64;</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win10-x64;osx.10.12-x64;ubuntu.16.10-x64;debian.8-x64;</RuntimeIdentifiers>
|
||||||
<PackageTargetFallback>portable-net45+win8</PackageTargetFallback>
|
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||||
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -11,9 +11,6 @@
|
||||||
<Content Include="wwwroot\**" />
|
<Content Include="wwwroot\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Startup.Auth.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -45,24 +42,4 @@
|
||||||
<ProjectReference Include="..\Ombi.Settings\Ombi.Settings.csproj" />
|
<ProjectReference Include="..\Ombi.Settings\Ombi.Settings.csproj" />
|
||||||
<ProjectReference Include="..\Ombi.TheMovieDbApi\Ombi.Api.TheMovieDb.csproj" />
|
<ProjectReference Include="..\Ombi.TheMovieDbApi\Ombi.Api.TheMovieDb.csproj" />
|
||||||
</ItemGroup>
|
</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>
|
</Project>
|
||||||
|
|
|
@ -11,6 +11,7 @@ namespace Ombi
|
||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(Directory.GetCurrentDirectory());
|
||||||
Console.Title = "Ombi";
|
Console.Title = "Ombi";
|
||||||
var host = new WebHostBuilder()
|
var host = new WebHostBuilder()
|
||||||
.UseKestrel()
|
.UseKestrel()
|
||||||
|
|
|
@ -20,13 +20,13 @@ namespace Ombi
|
||||||
private void ConfigureAuth(IApplicationBuilder app)
|
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
|
var tokenProviderOptions = new TokenProviderOptions
|
||||||
{
|
{
|
||||||
Path = Configuration.GetSection("TokenAuthentication:TokenPath").Value,
|
Path = "/api/v1/token/",
|
||||||
Audience = Configuration.GetSection("TokenAuthentication:Audience").Value,
|
Audience = "DemoAudience",
|
||||||
Issuer = Configuration.GetSection("TokenAuthentication:Issuer").Value,
|
Issuer = "DemoIssuer",
|
||||||
SigningCredentials = new SigningCredentials(signingKey, SecurityAlgorithms.HmacSha256),
|
SigningCredentials = new SigningCredentials(signingKey, SecurityAlgorithms.HmacSha256),
|
||||||
IdentityResolver = GetIdentity
|
IdentityResolver = GetIdentity
|
||||||
};
|
};
|
||||||
|
@ -38,10 +38,10 @@ namespace Ombi
|
||||||
IssuerSigningKey = signingKey,
|
IssuerSigningKey = signingKey,
|
||||||
// Validate the JWT Issuer (iss) claim
|
// Validate the JWT Issuer (iss) claim
|
||||||
ValidateIssuer = true,
|
ValidateIssuer = true,
|
||||||
ValidIssuer = Configuration.GetSection("TokenAuthentication:Issuer").Value,
|
ValidIssuer = "DemoIssuer",
|
||||||
// Validate the JWT Audience (aud) claim
|
// Validate the JWT Audience (aud) claim
|
||||||
ValidateAudience = true,
|
ValidateAudience = true,
|
||||||
ValidAudience = Configuration.GetSection("TokenAuthentication:Audience").Value,
|
ValidAudience = "DemoAudience",
|
||||||
// Validate the token expiry
|
// Validate the token expiry
|
||||||
ValidateLifetime = true,
|
ValidateLifetime = true,
|
||||||
// If you want to allow a certain amount of clock drift, set that here:
|
// 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)
|
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);
|
var validLogin = await userIdentityManager.CredentialsValid(username, password);
|
||||||
if (!validLogin)
|
if (!validLogin)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Configuration;
|
|
||||||
using System.Security.Principal;
|
using System.Security.Principal;
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using AutoMapper.EquivalencyExpression;
|
using AutoMapper.EquivalencyExpression;
|
||||||
|
@ -23,6 +22,7 @@ namespace Ombi
|
||||||
{
|
{
|
||||||
public Startup(IHostingEnvironment env)
|
public Startup(IHostingEnvironment env)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(env.ContentRootPath);
|
||||||
var builder = new ConfigurationBuilder()
|
var builder = new ConfigurationBuilder()
|
||||||
.SetBasePath(env.ContentRootPath)
|
.SetBasePath(env.ContentRootPath)
|
||||||
.AddJsonFile("appsettings.json", false, true)
|
.AddJsonFile("appsettings.json", false, true)
|
||||||
|
@ -68,11 +68,6 @@ namespace Ombi
|
||||||
{
|
{
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
app.UseExceptionHandler("/Home/Error");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
app.UseHangfireServer();
|
app.UseHangfireServer();
|
||||||
app.UseHangfireDashboard();
|
app.UseHangfireDashboard();
|
||||||
|
@ -84,13 +79,13 @@ namespace Ombi
|
||||||
|
|
||||||
ConfigureAuth(app);
|
ConfigureAuth(app);
|
||||||
|
|
||||||
var provider = new FileExtensionContentTypeProvider();
|
//var provider = new FileExtensionContentTypeProvider();
|
||||||
provider.Mappings[".map"] = "application/octet-stream";
|
//provider.Mappings[".map"] = "application/octet-stream";
|
||||||
|
|
||||||
app.UseStaticFiles(new StaticFileOptions()
|
//app.UseStaticFiles(new StaticFileOptions()
|
||||||
{
|
//{
|
||||||
ContentTypeProvider = provider
|
// ContentTypeProvider = provider
|
||||||
});
|
//});
|
||||||
|
|
||||||
app.UseMvc(routes =>
|
app.UseMvc(routes =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue