| | 153 | def get_encryption_method(self): |
|---|
| | 154 | """returns the encryption method from the config |
|---|
| | 155 | If None is set, or identity is disabled this will return None |
|---|
| | 156 | """ |
|---|
| | 157 | identity_system = config.get('sa_auth', None) |
|---|
| | 158 | if identity_system is None: |
|---|
| | 159 | # if identity is not activated in the config we should warn |
|---|
| | 160 | # the admin through the logs... and return None |
|---|
| | 161 | return None |
|---|
| | 162 | |
|---|
| | 163 | return identity_system.get('password_encryption_method', None) |
|---|
| | 164 | |
|---|
| 155 | | """ |
|---|
| 156 | | identity = config.get('identity', None) |
|---|
| 157 | | if identity is None: |
|---|
| 158 | | return password |
|---|
| 159 | | algorithm = identity.get('password_encryption_method', None) |
|---|
| | 167 | this method _MUST_ return a boolean. |
|---|
| | 168 | |
|---|
| | 169 | @param password: the password that was provided by the user to |
|---|
| | 170 | try and authenticate. This is the clear text version that we will |
|---|
| | 171 | need to match against the (possibly) encrypted one in the database. |
|---|
| | 172 | @type password: unicode object |
|---|
| | 173 | """ |
|---|
| | 174 | algorithm = self.get_encryption_method() |
|---|
| | 319 | def get_encryption_method(self): |
|---|
| | 320 | """returns the encryption method from the config |
|---|
| | 321 | If None is set, or identity is disabled this will return None |
|---|
| | 322 | """ |
|---|
| | 323 | identity_system = config.get('sa_auth', None) |
|---|
| | 324 | if identity_system is None: |
|---|
| | 325 | # if identity is not activated in the config we should warn |
|---|
| | 326 | # the admin through the logs... and return None |
|---|
| | 327 | return None |
|---|
| | 328 | |
|---|
| | 329 | return identity_system.get('password_encryption_method', None) |
|---|
| | 330 | |
|---|
| 306 | | """ |
|---|
| 307 | | identity = config.get('identity', None) |
|---|
| 308 | | if identity is None: |
|---|
| 309 | | return password |
|---|
| 310 | | algorithm = identity.get('password_encryption_method', None) |
|---|
| | 333 | this method _MUST_ return a boolean. |
|---|
| | 334 | |
|---|
| | 335 | @param password: the password that was provided by the user to |
|---|
| | 336 | try and authenticate. This is the clear text version that we will |
|---|
| | 337 | need to match against the (possibly) encrypted one in the database. |
|---|
| | 338 | @type password: unicode object |
|---|
| | 339 | """ |
|---|
| | 340 | algorithm = self.get_encryption_method() |
|---|