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 (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)

Group: Forum Members
Posts: 7, Visits: 15
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 (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)

Group: Administrators
Posts: 2K, Visits: 4.6K
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
Wouter van de Weerd
Wouter van de Weerd
New Member
New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)New Member (15 reputation)

Group: Forum Members
Posts: 7, Visits: 15
[quote]
ComponentSpace - 8/15/2019
...
My suggestion is to save the name in the ASP.NET Core session state for later retrieval.
...
I was hoping another solution might be available, but using session state will do the job.
Thanks!
ComponentSpace
ComponentSpace
ComponentSpace Development
ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)ComponentSpace Development (2.8K reputation)

Group: Administrators
Posts: 2K, Visits: 4.6K
You're welcome.

Regards
ComponentSpace Development
GO


Similar Topics


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


Password:


Social Logins

Select a Forum....









ComponentSpace Forums


Search