Given a 3-layer architecture:
- Domain Logic Layer
- Data Access Layer
- User Interface Layer (ASP.NET MVC web app)
What is the correct location for placing the logic related to constructing a custom user identity, adding custom Claims, and signing it into the web application?
For example, logic like this:
if (something)
customClaim = new Claim("MyClaimType1", "SomeClaimValue");
else
customClaim = new Claim("MyClaimType2", "AnotherClaimValue");
customClaimsIdentity.AddClaim(customClaim);
HttpContext.Current.GetOwinContext().Authentication.SignIn(customClaimsIdentity);
I want to say the UI layer, but isn't the custom logic (i.e. custom user) something of a domain thing? Little confused here...