Skip to content

How to run custom authorization code only for specific routes? #1626

Closed

Description

@fauresco

I have written a custom authorization routine hooked up in Ocelot PreAuthorizationMiddleware.

How can I run this just for specific routes?

Is there any concept like adding a custom property to a route? Something like UseAdvancedAuthorization=true and somehow access this in the PreAuthorizationMiddleware to decide if it will handle the authorization or just let the default AuthorizationMiddleware do its job.

Activity

  1. ahmedanwar100 commented on Jan 3, 2023

    @ahmedanwar100
  2. changed the title [-]Question: How to run custom authorization code only for specific routes?[/-] [+]How to run custom authorization code only for specific routes?[/+] on Oct 17, 2023
  3. self-assigned this
    on Oct 17, 2023
  4. added
    question
    on Oct 17, 2023
  5. locked and limited conversation to collaborators on Oct 17, 2023
  6. converted this issue into a discussion #1737 on Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

question

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions