Modified ClaimNameAttribute to support multiple claim names depending on environment
Environment name will be pulled from environment variable: ASPNETCORE_ENVIRONMENT
This commit is contained in:
9
API/YABA.Common/Utils/EnvironmentUtils.cs
Normal file
9
API/YABA.Common/Utils/EnvironmentUtils.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace YABA.Common.Utils
|
||||
{
|
||||
public static class EnvironmentUtils
|
||||
{
|
||||
public static bool IsDevelopmentEnvironment() => Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "Development";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user