public void PostConfigure(string name, OpenIddictServerOwinOptions options)
        {
            if (options is null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            if (options.AuthenticationMode == AuthenticationMode.Active)
            {
                throw new InvalidOperationException(SR.GetResourceString(SR.ID0119));
            }
        }
Ejemplo n.º 2
0
        public void PostConfigure([CanBeNull] string name, [NotNull] OpenIddictServerOwinOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            if (options.AuthenticationMode == AuthenticationMode.Active)
            {
                throw new InvalidOperationException(new StringBuilder()
                                                    .AppendLine("The OpenIddict OWIN server handler cannot be used as an active authentication handler.")
                                                    .Append("Make sure that 'OpenIddictServerOwinOptions.AuthenticationMode' is not set to 'Active'.")
                                                    .ToString());
            }
        }