diff --git a/auth/password.py b/auth/password.py index c372e740..c084cd4e 100644 --- a/auth/password.py +++ b/auth/password.py @@ -1,11 +1,11 @@ -from passlib.hash import pbkdf2_sha256 +from passlib.hash import bcrypt class Password: @staticmethod def encode(password: str) -> str: - return pbkdf2_sha256.hash(password) + return bcrypt.hash(password) @staticmethod def verify(password: str, other: str) -> bool: - return pbkdf2_sha256.verify(password, other) + return bcrypt.verify(password, other) diff --git a/schema.graphql b/schema.graphql index 84539235..2cb59bf7 100644 --- a/schema.graphql +++ b/schema.graphql @@ -116,7 +116,6 @@ type Subscription { ############################################ Entities type Role { - id: Int! name: String! org: String! level: Int! # 1-8 @@ -124,16 +123,19 @@ type Role { } type User { - createdAt: DateTime! + username: String! # email email: String + password: String + viewname: String # to display + userpic: String + links: [String] emailConfirmed: Boolean id: Int! muted: Boolean rating: Int roles: [Role!]! + createdAt: DateTime! updatedAt: DateTime! - username: String - userpic: String wasOnlineAt: DateTime }