refactor: Projektdateien migriert. Cloud-NuGet-Pakete durch lokale NuGet-Projekte ersetzt.
This commit is contained in:
32
HRD.LDAPService/JWT/JwtRole.cs
Normal file
32
HRD.LDAPService/JWT/JwtRole.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace HRD.LDAPService
|
||||
{
|
||||
public class JwtRole
|
||||
{
|
||||
private string role;
|
||||
private string _group;
|
||||
|
||||
public JwtRole(string role) : this(role, string.Empty)
|
||||
{ }
|
||||
|
||||
public JwtRole(string role, string group)
|
||||
{
|
||||
Role = role;
|
||||
Group = group;
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string Role { get => role; set => role = value; }
|
||||
|
||||
[Required]
|
||||
public string Group
|
||||
{
|
||||
get => _group;
|
||||
|
||||
//"dhr/" prefix should be removed
|
||||
set => _group = string.IsNullOrEmpty(value) ? string.Empty : value.Replace(@"DHR\", "", StringComparison.InvariantCultureIgnoreCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user