public User(long id, string nameId, AuthenticationSchema authenticationSchema, string name, UserRole role, bool active) { Id = id; NameId = nameId; Name = name; Role = role; Active = active; }
public User(string nameId, AuthenticationSchema authenticationSchema, string name, UserRole role, bool active) { NameId = nameId; AuthenticationSchema = authenticationSchema; Name = name; Role = role; Active = active; }
public void AddAuthorization(AuthenticationSchema schema, string hash) { if (string.IsNullOrWhiteSpace(hash)) { throw new ArgumentNullException(nameof(hash)); } switch (schema) { case AuthenticationSchema.Basic: AuthorizationHeader = $"Basic {hash}"; break; case AuthenticationSchema.Bearer: AuthorizationHeader = $"Bearer {hash}"; break; } }