thinktecture/Thinktecture.IdentityModel.45 — pull request #49 by SomaticIT (2013-03-27 21:45:24+00:00)
Title: Add Role support to HTTP BasicAuthentication

1. Adding a new BasicAuthenticationWithRoleSecurityTokenHandler derived from BasicAuthenticationSecurityTokenHandler.
This class add a second delegate taking username in argument and returning an array of user's roles.
It override ValidateToken Method and added roles into claims identity.
2. Add a new extension method to AuthenticationConfig which signature is
AddBasicAuthentication(this AuthenticationConfiguration configuration, Func validationDelegate, Func roleDelegate, string realm = "localhost", bool retainPassword = false)

This change permit easy integration of any role provider to basic authentication protocol.