コード例 #1
0
        /// <summary>
        /// Adds OneId authentication capabilities.
        /// </summary>
        /// <param name="app">The authentication builder.</param>
        /// <param name="options">The specific OneId authentication options, like environment and PKI.</param>
        /// <returns>The <see cref="IAppBuilder"/>.</returns>
        public static IAppBuilder UseOneIdAuthentication(this IAppBuilder app, OneIdAuthenticationOptions options)
        {
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            app.Use(typeof(OneIdAuthenticationMiddleware), app, options);
            return(app);
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="options">The options</param>
 public OneIdAuthenticationBackChannelHandler(OneIdAuthenticationOptions options)
 {
     _options = options;
 }