Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax Call [AuthorizeForScopes] Attributed Action Produce CORS error when MSAL exception is thrown #665

Merged
merged 4 commits into from
Oct 8, 2020

Commits on Oct 7, 2020

  1. Controller Action decorated with [AuthorizeForScopes] Attribute calle…

    …d by ajax method cause use agent CORS error.
    
    Suggest enhancement
    (1) in [AuthorizeForScopes] to provide a return url extract from ajax custom header for user agent to return to after the challenge is satisfied.
    (2) in OpenIdConnentHandler,  after the redirect url for Identity Provider is calculated, for ajax request, the handler will return a 401 with this redirect url in the header location.
    
    Added a test project to test modified AuthorizeForScopes Attribute to handle Ajax call. It depends on a locally built microsoft.aspnetcore.authentication.openidconnect dev nupkg within which associate change on ajax call redirection is handled differently (OpenIdConnectHandler need to be updated at Asp.net Core side).
    Xiaodong Lu authored and Xiaodong Lu committed Oct 7, 2020
    Configuration menu
    Copy the full SHA
    750beb0 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2020

  1. more AjaxCallActionsWithDynamicConsent test project to tests folder.

    Xiaodong Lu authored and Xiaodong Lu committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    e609be9 View commit details
    Browse the repository at this point in the history
  2. moved the test project into tests folder, need to adjust the path of …

    …the lib project to test project.
    Xiaodong Lu authored and Xiaodong Lu committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    491919b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c5fc98d View commit details
    Browse the repository at this point in the history