public AuthorizationCodeRequest(
     IServiceBundle serviceBundle,
     AuthenticationRequestParameters authenticationRequestParameters,
     AcquireTokenByAuthorizationCodeParameters authorizationCodeParameters)
     : base(serviceBundle, authenticationRequestParameters, authorizationCodeParameters)
 {
     _authorizationCodeParameters = authorizationCodeParameters;
     RedirectUriHelper.Validate(authenticationRequestParameters.RedirectUri);
 }
        public InteractiveRequest(
            IServiceBundle serviceBundle,
            AuthenticationRequestParameters authenticationRequestParameters,
            AcquireTokenInteractiveParameters interactiveParameters,
            IWebUI webUi)
            : base(serviceBundle, authenticationRequestParameters, interactiveParameters)
        {
            _interactiveParameters = interactiveParameters;
            RedirectUriHelper.Validate(authenticationRequestParameters.RedirectUri);
            webUi?.ValidateRedirectUri(authenticationRequestParameters.RedirectUri);

            // todo(migration): can't this just come directly from interactive parameters instead of needing do to this?
            _extraScopesToConsent = new SortedSet <string>();
            if (!_interactiveParameters.ExtraScopesToConsent.IsNullOrEmpty())
            {
                _extraScopesToConsent = ScopeHelper.CreateSortedSetFromEnumerable(_interactiveParameters.ExtraScopesToConsent);
            }

            ValidateScopeInput(_extraScopesToConsent);

            _webUi = webUi;
            _interactiveParameters.LogParameters(authenticationRequestParameters.RequestContext.Logger);
        }
 public override void ValidateRedirectUri(Uri redirectUri)
 {
     RedirectUriHelper.Validate(redirectUri, usesSystemBrowser: false);
 }