|
a/Allura/allura/model/auth.py |
|
b/Allura/allura/model/auth.py |
|
... |
|
... |
118 |
session = main_orm_session
|
118 |
session = main_orm_session
|
119 |
unique_indexes = [ 'user_id' ]
|
119 |
unique_indexes = [ 'user_id' ]
|
120 |
|
120 |
|
121 |
_id = FieldProperty(S.ObjectId)
|
121 |
_id = FieldProperty(S.ObjectId)
|
122 |
user_id = ForeignIdProperty('User')
|
122 |
user_id = ForeignIdProperty('User')
|
123 |
api_key = FieldProperty(str, if_missing=uuid.uuid4)
|
123 |
api_key = FieldProperty(str, if_missing=lambda:str(uuid.uuid4()))
|
124 |
secret_key = FieldProperty(str, if_missing=h.cryptographic_nonce)
|
124 |
secret_key = FieldProperty(str, if_missing=h.cryptographic_nonce)
|
125 |
|
125 |
|
126 |
user = RelationProperty('User')
|
126 |
user = RelationProperty('User')
|
127 |
|
127 |
|
128 |
@classmethod
|
128 |
@classmethod
|