c# - Error CS0122 'AuthenticationOptions' is inaccessible due to its protection level -
i following guide write own katana authentication middleware.
now encountered problem when i'm writing authenticationoptions. "inaccessible due protection level" when inherent microsoft.owin.security.authenticationoptions. thing class protected, should not inaccessible? have tried clean , rebuild, still same error. must missing something?
my class:
using microsoft.owin; using microsoft.owin.security; using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; namespace dummy { public class dummyauthenticationoptions : authenticationoptions { public dummyauthenticationoptions(string username, string userid) : base(constants.defaultauthenticationtype) { description.caption = constants.defaultauthenticationtype; callbackpath = new pathstring("/signin-dummy"); authenticationmode = authenticationmode.passive; username = username; userid = userid; } public pathstring callbackpath { get; set; } public string username { get; set; } public string userid { get; set; } public string signinasauthenticationtype { get; set; } public isecuredataformat<authenticationproperties> statedataformat { get; set; } } }
microsoft.owin.security.authenticationoptions:
namespace microsoft.owin.security { internal abstract class authenticationoptions { protected authenticationoptions(string authenticationtype); public authenticationmode authenticationmode { get; set; } public string authenticationtype { get; set; } public authenticationdescription description { get; set; } } }
the problem authenticationoptions
class set internal. downgraded microsft.owin.security
package 3.0.1 2.0.1. here class marked public
able compile without problems.
thanks dmitry rotay
Comments
Post a Comment