feat(auth): implemented users and user auth
#5 [Story] Create User Sessions
This commit is contained in:
20
knockoutwhistweb/app/model/users/User.scala
Normal file
20
knockoutwhistweb/app/model/users/User.scala
Normal file
@@ -0,0 +1,20 @@
|
||||
package model.users
|
||||
|
||||
import java.util.UUID
|
||||
|
||||
case class User(
|
||||
internalId: Long,
|
||||
id: UUID,
|
||||
name: String,
|
||||
passwordHash: String
|
||||
) {
|
||||
|
||||
def withName(newName: String): User = {
|
||||
this.copy(name = newName)
|
||||
}
|
||||
|
||||
private def withPasswordHash(newPasswordHash: String): User = {
|
||||
this.copy(passwordHash = newPasswordHash)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user