ComponentSpace

Forums



How to get service provider partner name in login view/page?


How to get service provider partner name in login view/page?

Author
Message
Wouter van de Weerd
Wouter van de Weerd
New Member
New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)New Member (18 reputation)

Group: Forum Members
Posts: 9, Visits: 55
I am using the ExampleIdentityProvider from the Examples solution as an example for my own IdentityProvider implementation.
In my case I will have multiple partner service providers that can use my IdentityProvider for SSO and SSO.
Whenever a SP initiated SSO is processed in my IdentityProvider, I want to show the name of the Partner SP in the login view / page, to indicate the user for which SP (s)he is logging in.
But I can not find an easy  way to do this. 

Using the delegate OnAuthRequestReceived I can get the partner name in the delegate method, but how can I then get the name available in the login view/page?

Or in the SamlController in the SingleSignOnService method I can do:

var idpSsoRes = await _samlIdentityProvider.ReceiveSsoAsync();
var partnerName = idpSsoRes.PartnerName;

But then again the question: how to get this partnerName value available in the login view/page?

Because the login view/page will be processed on/as a different httpRequest it is not possible to add something to the httpContext.Items...

So is there a way to read the current SSO context or state in the login view/page, using dependency injection to get the correct instance of one of the ComponentSpace classes?
Or some other solution?

ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)ComponentSpace Development (4.4K reputation)

Group: Administrators
Posts: 3.2K, Visits: 11K
As you've said, the partner name is available at the time you call ReceiveSsoAsync.
My suggestion is to save the name in the ASP.NET Core session state for later retrieval.

The other option is to retrieve the ISsoStatus using _samlIdentityProvider.ReceiveSsoAsync();
For Example:

var ssoStatus = await _samlIdentityProvider.ReceiveSsoAsync();
var partnerName = ssoStatus.GetPartnerPendingResponse();




Regards
ComponentSpace Development
GO


Similar Topics


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


Password:


Select a Forum....












Forums, Documentation & Knowledge Base - ComponentSpace


Search