Ibraaheem commited on
Commit
ad9237d
·
1 Parent(s): 828101b

Update private_gpt/server/utils/authentication.py

Browse files
private_gpt/server/utils/authentication.py CHANGED
@@ -12,7 +12,7 @@ router = APIRouter(
12
  tags=['auth']
13
  )
14
 
15
- SECRET_KEY = '1b510738bd0cd2d5757a27935aa4355b04efcd268a180fafd5fb7d8de60cc73a'
16
  ALGORITHM = 'HS256'
17
 
18
  bcrypt_context = CryptContext(schemes=['bcrypt'], deprecated='auto')
@@ -21,13 +21,13 @@ oauth2_bearer = OAuth2PasswordBearer(tokenUrl='/v1/auth/token')
21
  hardcoded_users = [
22
  { "id": 1,
23
  "username": "test",
24
- "password_hash": bcrypt_context.hash("secret"),
25
  "role": "user"
26
  },
27
 
28
  { "id": 2,
29
  "username": "admin",
30
- "password_hash": bcrypt_context.hash("admin"),
31
  "role": "admin"
32
  },
33
 
 
12
  tags=['auth']
13
  )
14
 
15
+ SECRET_KEY = PASSWORD
16
  ALGORITHM = 'HS256'
17
 
18
  bcrypt_context = CryptContext(schemes=['bcrypt'], deprecated='auto')
 
21
  hardcoded_users = [
22
  { "id": 1,
23
  "username": "test",
24
+ "password_hash": bcrypt_context.hash(USER_HASH),
25
  "role": "user"
26
  },
27
 
28
  { "id": 2,
29
  "username": "admin",
30
+ "password_hash": bcrypt_context.hash(ADMIN_HASH),
31
  "role": "admin"
32
  },
33