示例#1
0
        public static IAppBuilder UseStepikOAuthAuthentication(this IAppBuilder app, StepikOAuthAuthenticationOptions options)
        {
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            app.Use(typeof(StepikOAuthAuthenticationMiddleware), app, options);
            return(app);
        }
 public StepikOAuthAuthenticationMiddleware(OwinMiddleware next, IAppBuilder app, StepikOAuthAuthenticationOptions options)
     : base(next, app, options)
 {
     owinLogger = app.CreateLogger <StepikOAuthAuthenticationMiddleware>();
     log        = LogManager.GetLogger(typeof(StepikOAuthAuthenticationMiddleware));
 }