Skip to main content
Added code of my IdentityProvidersProcessor
Source Link

I'm using Sitecore 9.1 and following Sitecore's guide in implementing Federated Authentication.

I am implementing Sitecore.Owin.Authentication.Pipelines.IdentityProviders.IdentityProvidersProcessor, that in Sitecore 9.1 has a constructor with the following signature:

protected IdentityProvidersProcessor(FederatedAuthenticationConfiguration federatedAuthenticationConfiguration, ICookieManager cookieManager, BaseSettings settings);

That in my implementation I'm leaving 'as is':

public MyOwnProcessor(
FederatedAuthenticationConfiguration federatedAuthenticationConfiguration,
Microsoft.Owin.Infrastructure.ICookieManager cookieManager,
Sitecore.Abstractions.BaseSettings settings) : 
base(federatedAuthenticationConfiguration, cookieManager, settings) {

}

And yet, I'm still getting the error

Could not create instance of type: MyProject.MyOwnProcessor. No matching constructor was found.

EDIT

Adding the entire code of my class:

namespace MyNamespace {
    public class MyOwnProcessor : IdentityProvidersProcessor {
        public MyOwnProcessor(FederatedAuthenticationConfiguration federatedAuthenticationConfiguration, Microsoft.Owin.Infrastructure.ICookieManager cookieManager, Sitecore.Abstractions.BaseSettings settings) : base(federatedAuthenticationConfiguration, cookieManager, settings) {

        }

        protected override string IdentityProviderName => "Okta";

        protected override void ProcessCore(IdentityProvidersArgs args) {
            // Currently does nothing, implementation pending
            string test = "test";
        }
    }
}

QUESTION

What could I be doing wrong? Do I need to provide some of these parameters in web.config perhaps?

I'm using Sitecore 9.1 and following Sitecore's guide in implementing Federated Authentication.

I am implementing Sitecore.Owin.Authentication.Pipelines.IdentityProviders.IdentityProvidersProcessor, that in Sitecore 9.1 has a constructor with the following signature:

protected IdentityProvidersProcessor(FederatedAuthenticationConfiguration federatedAuthenticationConfiguration, ICookieManager cookieManager, BaseSettings settings);

That in my implementation I'm leaving 'as is':

public MyOwnProcessor(
FederatedAuthenticationConfiguration federatedAuthenticationConfiguration,
Microsoft.Owin.Infrastructure.ICookieManager cookieManager,
Sitecore.Abstractions.BaseSettings settings) : 
base(federatedAuthenticationConfiguration, cookieManager, settings) {

}

And yet, I'm still getting the error

Could not create instance of type: MyProject.MyOwnProcessor. No matching constructor was found.

QUESTION

What could I be doing wrong? Do I need to provide some of these parameters in web.config perhaps?

I'm using Sitecore 9.1 and following Sitecore's guide in implementing Federated Authentication.

I am implementing Sitecore.Owin.Authentication.Pipelines.IdentityProviders.IdentityProvidersProcessor, that in Sitecore 9.1 has a constructor with the following signature:

protected IdentityProvidersProcessor(FederatedAuthenticationConfiguration federatedAuthenticationConfiguration, ICookieManager cookieManager, BaseSettings settings);

That in my implementation I'm leaving 'as is':

public MyOwnProcessor(
FederatedAuthenticationConfiguration federatedAuthenticationConfiguration,
Microsoft.Owin.Infrastructure.ICookieManager cookieManager,
Sitecore.Abstractions.BaseSettings settings) : 
base(federatedAuthenticationConfiguration, cookieManager, settings) {

}

And yet, I'm still getting the error

Could not create instance of type: MyProject.MyOwnProcessor. No matching constructor was found.

EDIT

Adding the entire code of my class:

namespace MyNamespace {
    public class MyOwnProcessor : IdentityProvidersProcessor {
        public MyOwnProcessor(FederatedAuthenticationConfiguration federatedAuthenticationConfiguration, Microsoft.Owin.Infrastructure.ICookieManager cookieManager, Sitecore.Abstractions.BaseSettings settings) : base(federatedAuthenticationConfiguration, cookieManager, settings) {

        }

        protected override string IdentityProviderName => "Okta";

        protected override void ProcessCore(IdentityProvidersArgs args) {
            // Currently does nothing, implementation pending
            string test = "test";
        }
    }
}

QUESTION

What could I be doing wrong? Do I need to provide some of these parameters in web.config perhaps?

Source Link

Could not create instance of type: <my implementation of IdentityProvidersProcessor> No matching constructor was found

I'm using Sitecore 9.1 and following Sitecore's guide in implementing Federated Authentication.

I am implementing Sitecore.Owin.Authentication.Pipelines.IdentityProviders.IdentityProvidersProcessor, that in Sitecore 9.1 has a constructor with the following signature:

protected IdentityProvidersProcessor(FederatedAuthenticationConfiguration federatedAuthenticationConfiguration, ICookieManager cookieManager, BaseSettings settings);

That in my implementation I'm leaving 'as is':

public MyOwnProcessor(
FederatedAuthenticationConfiguration federatedAuthenticationConfiguration,
Microsoft.Owin.Infrastructure.ICookieManager cookieManager,
Sitecore.Abstractions.BaseSettings settings) : 
base(federatedAuthenticationConfiguration, cookieManager, settings) {

}

And yet, I'm still getting the error

Could not create instance of type: MyProject.MyOwnProcessor. No matching constructor was found.

QUESTION

What could I be doing wrong? Do I need to provide some of these parameters in web.config perhaps?