multiple grant
This commit is contained in:
parent
022011d285
commit
e408739c95
1 changed files with 5 additions and 0 deletions
|
|
@ -54,6 +54,11 @@ class Application(AbstractApplication):
|
||||||
return app_scopes.intersection(all_scopes)
|
return app_scopes.intersection(all_scopes)
|
||||||
|
|
||||||
|
|
||||||
|
def allows_grant_type(self, *grant_types):
|
||||||
|
# Assume, for this example, that self.authorization_grant_type is set to self.GRANT_AUTHORIZATION_CODE
|
||||||
|
return bool(set([self.authorization_grant_type, self.GRANT_CLIENT_CREDENTIALS]) & set(grant_types))
|
||||||
|
|
||||||
|
|
||||||
class Scope(models.Model):
|
class Scope(models.Model):
|
||||||
"""
|
"""
|
||||||
Django model for an OAuth scope.
|
Django model for an OAuth scope.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue