I am implementing an override of the AbstractSamlConfigurationResolver class called CustomerSamlConfigurationResolver
. I have a custom assertion endpoint for my local service provider. This custom assertion endpoint follows the examples given by ComponentSpace exactly for now. It is pasted at the bottom of this post.
My question is whenever the method GetLocalServiceProviderConfigurationAsync(string configurationId) of my CustomerSamlConfigurationResolver : AbstractSamlConfigurationResolver is called the configurationId paramter is null. This method gets called as part of the ReceiveSsoAsync() method. I must have configured something incorrectly for this to correct but I am not sure what?
My configuration is done programatically and I only setup a local service provider
private void ConfigureComponentSpaceSaml(SamlConfigurations samlConfigurations)
samlConfigurations.Configurations = new List<SamlConfiguration>()
LocalServiceProviderConfiguration = new LocalServiceProviderConfiguration()
Name = "Identity Service Provider",
Description = "Identity Service Provider",
AssertionConsumerServiceUrl = "http://localhost:3600/Saml2/Acs",
SingleLogoutServiceUrl = "http://localhost:3600/Saml2/SingleLogoutService",
ArtifactResolutionServiceUrl = "http://localhost:3600/Saml2/ArtifactResolutionService",
Assertion Endpoint Code:
public async Task<IActionResult> ACS()
// Receive and process the SAML assertion contained in the SAML response.
// The SAML response is received either as part of IdP-initiated or SP-initiated SSO.
var ssoResult = await _samlServiceProvider.ReceiveSsoAsync();
// Automatically provision the user.
// If the user doesn't exist locally then create the user.
// Automatic provisioning is an optional step.
var user = await _userManager.FindByNameAsync(ssoResult.UserID);
// Automatically login using the asserted identity.
await _signInManager.SignInAsync(user, isPersistent: false);
// Redirect to the target URL if specified.