Skip to content

UID2-6511 Remove "policy" field from JSON request#69

Merged
swibi-ttd merged 6 commits intomainfrom
swi-UID2-6511-remove-optout-check
Feb 17, 2026
Merged

UID2-6511 Remove "policy" field from JSON request#69
swibi-ttd merged 6 commits intomainfrom
swi-UID2-6511-remove-optout-check

Conversation

@swibi-ttd
Copy link
Contributor

@swibi-ttd swibi-ttd commented Feb 6, 2026

# Always use .do_not_generate_tokens_for_opted_out(), which applies policy=1. Support for policy=0 will be removed soon.
def do_not_generate_tokens_for_opted_out(self):
self.generate_for_opted_out = False
# DEPRECATED: The optout_check/policy param has been removed from /token/generate
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The official @deprecated decorator was only released in 3.13. So this is only "silently" deprecated, unless we wanted to use the external typing-extensions module?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use the typing-extensions module. It's better to properly mark this as deprecated!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added typing-extensions to dependencies and marked this func as deprecated

@swibi-ttd swibi-ttd merged commit 24b7b50 into main Feb 17, 2026
11 checks passed
@swibi-ttd swibi-ttd deleted the swi-UID2-6511-remove-optout-check branch February 17, 2026 22:40
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.

2 participants