1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

added identity server real cert loading

This commit is contained in:
Kyle Spearrin
2017-01-12 18:35:26 -05:00
parent f105bd775d
commit 6cde9ed223
5 changed files with 35 additions and 24 deletions

View File

@ -1,7 +1,6 @@
using System;
using System.Security.Claims;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
@ -29,6 +28,7 @@ using IdentityServer4.Validation;
using IdentityServer4.Services;
using IdentityModel.AspNetCore.OAuth2Introspection;
using IdentityServer4.Stores;
using Bit.Core.Utilities;
namespace Bit.Api
{
@ -87,9 +87,9 @@ namespace Bit.Api
services.AddSingleton<IRateLimitCounterStore, MemoryCacheRateLimitCounterStore>();
// IdentityServer
var identityServerCert = CoreHelpers.GetCertificate(globalSettings.IdentityServer.CertificateThumbprint);
services.AddIdentityServer()
// TODO: Add proper signing creds
.AddTemporarySigningCredential()
.AddSigningCredential(identityServerCert)
.AddInMemoryApiResources(ApiResources.GetApiResources())
.AddInMemoryClients(Clients.GetClients());
services.AddSingleton<IResourceOwnerPasswordValidator, ResourceOwnerPasswordValidator>();

View File

@ -24,6 +24,9 @@
"gcmApiKey": "SECRET",
"gcmAppPackageName": "com.x8bit.bitwarden"
},
"identityServer": {
"certificateThumbprint": "SECRET"
},
"storage": {
"connectionString": "SECRET"
}