I'm glad you've included GenericPrincipal for the common username/password authentication scheme. However, there is one big issue.

When I want to inherit Person/Customer/etc. from GenericPrincipal, the Name property should not be used as the username - it should instead be the full name for the Person/Customer. I'd instead like to specify a different property to be used as the authenticating username.

Also, this is important for cases where I want to use the email as the authenticating username.

For example:

public class Customer : GenericPrincipal {
  public string Name { get; set; } // This should be the customer's real name, e.g. "Joe Smith"

  [Field, AuthenticationUsername]
  public string Email { get; set; } // I want to use this as the customer's login credential

  // public string PasswordHash { get; set; } // This should be inherited from GenericPrincipal, as is the case

Moreover, there are many cases where I don't want all Persons/Customers to have login access. Therefore, it should be possible to leave Email nullable. So, there should NOT be a UNIQUE index applied to Email, because multiple Customers could have null emails (I may not know many of their emails)... unless we apply a FILTERED unique index for non-null values.

This is very important for my project. How long would it take to implement this?

asked Nov 19 '11 at 04:22

ara's gravatar image


edited Nov 20 '11 at 06:47

Dmitri%20Maximov's gravatar image

Dmitri Maximov

One Answer:


Bearing in mind that architecture of security-related stuff could differ from project to project quite significantly, we intentionally developed this part as a separate module (Xtensive.Practices.Security) and included it with full sources. Therefore, you can always adjust the security layer for the particular architecture.

answered Nov 20 '11 at 07:20

Dmitri%20Maximov's gravatar image

Dmitri Maximov

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview


Once you sign in you will be able to subscribe for any updates here



Asked: Nov 19 '11 at 04:22

Seen: 2,619 times

Last updated: Nov 20 '11 at 07:20

powered by OSQA