This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
authentic2-idp-oauth2/authentic2_idp_oauth2/forms.py

12 lines
305 B
Python

from django.forms import Form
from provider.oauth2.models import Grant
class EmptyForm(Form):
def __init__(self, *args, **kwargs):
self.scope = kwargs.pop('scope')
super(EmptyForm, self).__init__(*args, **kwargs)
def save(self, **kwargs):
return Grant(scope=self.scope)