ComponentSpace

Forums



Can SAMLProvider service be injected in startup.cs


Can SAMLProvider service be injected in startup.cs

Author
Message
akanksha10
akanksha10
New Member
New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)

Group: Forum Members
Posts: 16, Visits: 68
Hi Team, 
Good Day !

Is there any way, we can use " await _samlServiceProvider.InitiateSsoAsync(partnerIdP, null);" call in Configure method of startup.cs as i am not able to inject it in constructor of startup as its not suggested.
Requirement is to replace present WsFederationDefaults with Componentspacesaml .

Thanks
Akanksha
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)

Group: Administrators
Posts: 2.9K, Visits: 9.6K
Hi Akanksha,

The call to InitiateSsoAsync sends a SAML authn request to the specified partner identity provider. It does this by returning a 302 redirect HTTP response to the browser.

At start-up you don't have an HTTP response or browser context so this isn't possible.

Could you elaborate on your requirements?

Are you looking to use the SAML authentication handler middleware?

If so, please refer to the Examples Guide and the MiddlewareServiceProvider example project.

Thanks.



Regards
ComponentSpace Development
akanksha10
akanksha10
New Member
New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)

Group: Forum Members
Posts: 16, Visits: 68
ComponentSpace - 12/13/2021
Hi Akanksha,

The call to InitiateSsoAsync sends a SAML authn request to the specified partner identity provider. It does this by returning a 302 redirect HTTP response to the browser.

At start-up you don't have an HTTP response or browser context so this isn't possible.

Could you elaborate on your requirements?

Are you looking to use the SAML authentication handler middleware?

If so, please refer to the Examples Guide and the MiddlewareServiceProvider example project.

Thanks.


Sure . I will check that one too. Could you share the link of code base? i can find only pdf and not code base.

Also , my requirement is to have authentication through SAML when my .net core application is hit from an Angular UI application.
In this scenario, i have to initiate SSOAsync from Service provider. I have a different Identity provider. It should receive and send back. In whole of this flow when , IDP is sending back, my Assertion service is not being hit.

Thanks


ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)

Group: Administrators
Posts: 2.9K, Visits: 9.6K
You can download the free trial version including documentation and example projects at:

https://www.componentspace.com/saml-for-asp-net-core

The Examples Guide in the documentation folder includes a section describing an Angular app we ship that demonstrates SAML SSO. The Angular app delegates the SSO flow to an ASP.NET Core backend SAML service provider. I suggest taking a look at this guide and the Angular example.

If you're having issues with the SSO flow and the SAML response is not being returned to your assertion consumer service, please enable SAML trace and send the generated log file as an email attachment to [email protected] mentioning your forum post.

https://www.componentspace.com/forums/7936/Enabling-SAML-Trace 

Also, describe what happens at the identity provider. For example, does it prompt you to login? Does it display an error? If so, what are the details?

Regards
ComponentSpace Development
akanksha10
akanksha10
New Member
New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)

Group: Forum Members
Posts: 16, Visits: 68
ComponentSpace - 12/14/2021
You can download the free trial version including documentation and example projects at:

https://www.componentspace.com/saml-for-asp-net-core

The Examples Guide in the documentation folder includes a section describing an Angular app we ship that demonstrates SAML SSO. The Angular app delegates the SSO flow to an ASP.NET Core backend SAML service provider. I suggest taking a look at this guide and the Angular example.

If you're having issues with the SSO flow and the SAML response is not being returned to your assertion consumer service, please enable SAML trace and send the generated log file as an email attachment to [email protected] mentioning your forum post.

https://www.componentspace.com/forums/7936/Enabling-SAML-Trace 

Also, describe what happens at the identity provider. For example, does it prompt you to login? Does it display an error? If so, what are the details?

Sure Thanks. Let me try and share the findings
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)

Group: Administrators
Posts: 2.9K, Visits: 9.6K
Ok, thanks.

Regards
ComponentSpace Development
akanksha10
akanksha10
New Member
New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)New Member (20 reputation)

Group: Forum Members
Posts: 16, Visits: 68
ComponentSpace - 12/14/2021
Ok, thanks.

Hi Team, 
If i am using middleware in SP since it is SP initiated and Idp is normal asp.net application. will it work?
Thanks
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)ComponentSpace Development (4K reputation)

Group: Administrators
Posts: 2.9K, Visits: 9.6K
Yes, that will work. You can use either the middleware or SAML API in support of any of the SSO/SLO flows including SP-initiated SSO. The MiddlewareServiceProvider demonstrates using the SAML authentication handler middleware and the ExampleServiceProvider demonstrates calling the SAML API. The Examples Guide in the documentation folder walks you through these and other example projects.

The IdP can be an ASP.NET application or, in fact, any platform that supports the SAML v2.0 specification.  

Regards
ComponentSpace Development
GO


Similar Topics


Execution: 0.000. 2 queries. Compression Enabled.
Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....









Forums, Documentation & Knowledge Base - ComponentSpace


Search