public KonturPassportAuthenticationMiddleware(OwinMiddleware next, IAppBuilder app, KonturPassportAuthenticationOptions options) : base(next, options) { passportClient = new PassportClient(options.ClientId, new [] { "openid", "profile", "email" }); if (Options.StateDataFormat == null) { var dataProtector = app.CreateDataProtector( typeof(KonturPassportAuthenticationMiddleware).FullName, Options.AuthenticationType, "v1"); Options.StateDataFormat = new PropertiesDataFormat(dataProtector); } }
public KonturPassportAuthenticationMiddleware(OwinMiddleware next, IAppBuilder app, KonturPassportAuthenticationOptions options) : base(next, options) { log = LogManager.GetLogger(typeof(KonturPassportAuthenticationMiddleware)); var clientConfiguration = new PassportClientConfiguration { ClientId = Options.ClientId, ClientSecret = Options.ClientSecret, Scope = "profile email", }; var clientOptions = new ClientOptions(clientConfiguration); passportClient = new PassportClient(clientOptions); if (Options.StateDataFormat == null) { var dataProtector = app.CreateDataProtector( typeof(KonturPassportAuthenticationMiddleware).FullName, Options.AuthenticationType, "v1"); Options.StateDataFormat = new PropertiesDataFormat(dataProtector); } }
public KonturPassportAuthenticationHandler(PassportClient passportClient, ILog log) { this.passportClient = passportClient; this.log = log; }
public KonturPassportAuthenticationHandler(PassportClient passportClient) { this.passportClient = passportClient; }