static IdentityBasicAuthenticationAttribute() { //TODO: _bocAuthorizationService should be instantiated via IoC Container! Property injection will not work here since C# Attribute (sub)types are only allowed to receive simple types (int, double, string, etc.) _bocAuthorizationService = new BoCAuthorizationService(null, null, new BlowFish(System.Text.Encoding.ASCII.GetBytes(System.Web.Configuration.WebConfigurationManager.AppSettings["cipherSalt_IC"]))); //TODO: _simpleApiKey should be injected via IoC Container (requires jumping through a number of hoops (due to this being a .net 'Attribute' subclass) ) _simpleApiKey = System.Web.Configuration.WebConfigurationManager.AppSettings["simpleApiKey"]; }
public AuthenticationController(IBoCAuthorizationService bocAuthService) { this._bocAuthService = bocAuthService; }