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

Responses section refactor #274

Merged
merged 2 commits into from
Nov 15, 2023
Merged

Conversation

azgabur
Copy link
Contributor

@azgabur azgabur commented Nov 10, 2023

As discussed with @pehala this PR refactores Responses section and usage to closer mimic real AuthConfig/AuthPolicy structure. There are 4(+1) functions in authorization object now:

  • authorization.responses.add_success_header() - Add response as header
  • authorization.responses.add_success_dynamic() - Add response as dynamic Envoy metadata

These functions use dataclasses contain different types of responses JsonResponse, PlainResponse, WristbandResponse

  • set_unauthenticated()
  • set_unauthorized()

These functions use dataclass DenyResponse

The usage of authorization.responses.add_simple was not changed.

@azgabur azgabur requested review from pehala and averevki November 10, 2023 18:17
@azgabur azgabur force-pushed the responses_refactor2 branch from e1945bf to d252575 Compare November 13, 2023 12:18
@pehala pehala merged commit 1ba2786 into Kuadrant:main Nov 15, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants