Changes
This commit is contained in:
parent
9363cadb09
commit
2ee6315bb8
|
@ -34,7 +34,7 @@ class Authenticate(flask_restful.Resource):
|
|||
@staticmethod
|
||||
def _authenticate(username, secret):
|
||||
user = user_store.UserStore.username_table.get(username, None)
|
||||
if user and safe_str_cmp(user.secret, secret):
|
||||
if user and safe_str_cmp(user.secret.encode('utf-8'), secret.encode('utf-8')):
|
||||
return user
|
||||
|
||||
def post(self):
|
||||
|
|
|
@ -2,7 +2,7 @@ import {SHA3} from 'sha3';
|
|||
import decode from 'jwt-decode';
|
||||
|
||||
export default class AuthService {
|
||||
NO_AUTH_CREDS = 'loginwithoutpassword';
|
||||
NO_AUTH_CREDS = '1234567890!@#$%^&*()_nothing_up_my_sleeve_1234567890!@#$%^&*()';
|
||||
|
||||
SECONDS_BEFORE_JWT_EXPIRES = 20;
|
||||
AUTHENTICATION_API_ENDPOINT = '/api/auth';
|
||||
|
|
Loading…
Reference in New Issue