Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

How to add a custom implementation (e.g. WsFederation) of IReturnUrlParser if everything is internal set in AuthorizationRequest class in next v4.x ? #4368

Closed
alaincroisetiere opened this issue May 6, 2020 · 5 comments
Assignees
Milestone

Comments

@alaincroisetiere
Copy link

alaincroisetiere commented May 6, 2020

Question

How to add a custom implementation (e.g. WsFederation) of IReturnUrlParser if everything is internal set in AuthorizationRequest class in next v4.x ?

Minimal working example

IdentityServer4.WsFederation/src/IdentityServer4.WsFederation/WsFederation/WsFederationReturnUrlParser.cs

        public async Task<AuthorizationRequest> ParseAsync(string returnUrl)
        {
            var user = _contextAccessor.HttpContext.User;

            var signInMessage = GetSignInRequestMessage(returnUrl);
            if (signInMessage == null) return null;

            // call validator
            var result = await _signinValidator.ValidateAsync(signInMessage, user);
            if (result.IsError) return null;

            // populate request
            var request = new AuthorizationRequest()
            {
                ClientId = result.Client.ClientId,
                IdP = result.SignInRequestMessage.HomeRealm,
                RedirectUri = result.SignInRequestMessage.Reply
            };

            foreach (var item in result.SignInRequestMessage.Parameters)
            {
                request.Parameters.Add(item.Key, item.Value);
            }

            return request;
        }
@alaincroisetiere alaincroisetiere changed the title How to add a custom implementation (e.g. WsFederation) of IReturnUrlParser if everything is internet set AuthorizationRequest class class in next version v4.x ? How to add a custom implementation (e.g. WsFederation) of IReturnUrlParser if everything is internal set AuthorizationRequest class class in next version v4.x ? May 6, 2020
@alaincroisetiere alaincroisetiere changed the title How to add a custom implementation (e.g. WsFederation) of IReturnUrlParser if everything is internal set AuthorizationRequest class class in next version v4.x ? How to add a custom implementation (e.g. WsFederation) of IReturnUrlParser if everything is internal set in AuthorizationRequest class in next version v4.x ? May 6, 2020
@alaincroisetiere alaincroisetiere changed the title How to add a custom implementation (e.g. WsFederation) of IReturnUrlParser if everything is internal set in AuthorizationRequest class in next version v4.x ? How to add a custom implementation (e.g. WsFederation) of IReturnUrlParser if everything is internal set in AuthorizationRequest class in next v4.x ? May 6, 2020
@brockallen
Copy link
Member

So yea, looks like we changes them to internal? That was just an oversight. I can make the public again.

@brockallen brockallen added bug and removed question labels May 7, 2020
@brockallen brockallen self-assigned this May 7, 2020
@brockallen brockallen added this to the 4.0 milestone May 7, 2020
@stale
Copy link

stale bot commented May 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Questions are community supported only and the authors/maintainers may or may not have time to reply. If you or your company would like commercial support, please see here for more information.

@stale stale bot added the wontfix label May 21, 2020
@alaincroisetiere
Copy link
Author

Bug planned into 4.0 milestone.

@brockallen
Copy link
Member

Fixed. Thx for the heads up!

leastprivilege added a commit that referenced this issue May 23, 2020
* master:
  add null check when validating post logout redirect uri  #4295
  return setters back to public on AuthorizationRequest #4368
  update AspId host with UI updates
  update EF host with update UI
  Features/bootstrap update (#4427)
  add additional PKCE test
  add more detailed version logging
  cleanup in DefaultBackChannelLogoutService
  enhancements to add logout notification service as first class service (#4390)
  make apis that manipulate AuthenticationProperties public for client list and session id (#4411)

# Conflicts:
#	src/IdentityServer4/src/Configuration/DependencyInjection/BuilderExtensions/Additional.cs
@lock
Copy link

lock bot commented Jun 24, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants