Exemple #1
0
        public static IApplicationBuilder UseCasAuthentication(this IApplicationBuilder app, Action <CasAuthenticationOptions> configureOptions)
        {
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }
            var options = new CasAuthenticationOptions();

            configureOptions.Invoke(options);
            return(app.UseCasAuthentication(options));
        }
Exemple #2
0
 public static IApplicationBuilder UseCasAuthentication(this IApplicationBuilder app, CasAuthenticationOptions options)
 {
     if (app == null)
     {
         throw new ArgumentNullException(nameof(app));
     }
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     return(app.UseMiddleware <CasAuthenticationMiddleware>(Options.Create(options)));
 }
 public static IApplicationBuilder UseCasAuthentication(this IApplicationBuilder app, CasAuthenticationOptions options)
 {
     throw new NotSupportedException("This method is no longer supported");
 }