Make IdentityServer.Configuration.KeyDefinition linker friendly (#25524)
This commit is contained in:
parent
ab3799f651
commit
3254f71b95
|
|
@ -52,8 +52,21 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var key = new KeyDefinition();
|
var key = new KeyDefinition()
|
||||||
_configuration.Bind(key);
|
{
|
||||||
|
Type = _configuration[nameof(KeyDefinition.Type)],
|
||||||
|
FilePath = _configuration[nameof(KeyDefinition.FilePath)],
|
||||||
|
Password = _configuration[nameof(KeyDefinition.Password)],
|
||||||
|
Name = _configuration[nameof(KeyDefinition.Name)],
|
||||||
|
StoreLocation = _configuration[nameof(KeyDefinition.StoreLocation)],
|
||||||
|
StoreName = _configuration[nameof(KeyDefinition.StoreName)],
|
||||||
|
StorageFlags = _configuration[nameof(KeyDefinition.StorageFlags)]
|
||||||
|
};
|
||||||
|
|
||||||
|
if (bool.TryParse(_configuration[nameof(KeyDefinition.Persisted)], out var value))
|
||||||
|
{
|
||||||
|
key.Persisted = value;
|
||||||
|
}
|
||||||
|
|
||||||
switch (key.Type)
|
switch (key.Type)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue