Example #1
0
 public ApiRequestService(
     ApiAuthenticationOptions apiAuthenticationOptions,
     AuthenticatedUser authenticatedUser)
 {
     this.apiAuthenticationOptions = apiAuthenticationOptions;
     this.authenticatedUser        = authenticatedUser;
 }
        public static ApiAuthenticationOptions MapApiAuthenticationOptions(this ApiAuthenticationOptions apiAuthenticationOptions, string domain, string loginPath)
        {
            apiAuthenticationOptions.Domain    = domain;
            apiAuthenticationOptions.LoginPath = loginPath;

            return(apiAuthenticationOptions);
        }
Example #3
0
 public ApiAuthentication(
     ApiAuthenticationOptions options,
     AuthenticatedUser authenticatedUser
     )
 {
     this.options           = options;
     this.authenticatedUser = authenticatedUser;
 }
Example #4
0
 public AccountController(ILogger <HomeController> logger, ApiAuthenticationOptions options)
 {
     _logger      = logger;
     this.options = options;
 }
        /// <summary>
        /// Method to configure use of ApiAuthenticationMiddleware
        /// </summary>
        /// <param name="app"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static IAppBuilder UseApiAuthentication(this IAppBuilder app, ApiAuthenticationOptions options)
        {
            app.Use <ApiAuthenticationMiddleware>(options);

            return(app);
        }