fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new login api
[wolnelektury.git]
/
src
/
api
/
models.py
diff --git
a/src/api/models.py
b/src/api/models.py
index
ff1f09a
..
4f05565
100644
(file)
--- a/
src/api/models.py
+++ b/
src/api/models.py
@@
-101,7
+101,12
@@
class Consumer(models.Model):
class Token(models.Model):
REQUEST = 1
ACCESS = 2
class Token(models.Model):
REQUEST = 1
ACCESS = 2
- TOKEN_TYPES = ((REQUEST, 'Request'), (ACCESS, 'Access'))
+ REFRESH = 3
+ TOKEN_TYPES = (
+ (REQUEST, 'Request'),
+ (ACCESS, 'Access'),
+ (REFRESH, 'Refresh')
+ )
key = models.CharField(max_length=KEY_SIZE)
secret = models.CharField(max_length=SECRET_SIZE)
key = models.CharField(max_length=KEY_SIZE)
secret = models.CharField(max_length=SECRET_SIZE)