Can login with SSO & change Password

This commit is contained in:
2019-10-09 21:57:56 +02:00
parent 20416ce108
commit a6f25bcbb2
16 changed files with 197 additions and 41 deletions

View File

@@ -30,6 +30,12 @@ class Citizen(override var requester: Requester) : RepositoryI<CitizenEntity> {
.selectOne("username" to unsername)
}
fun findByEmail(email: String): CitizenEntity? {
return requester
.getFunction("find_citizen_by_email")
.selectOne("email" to email)
}
fun find(
page: Int = 1,
limit: Int = 50,

View File

@@ -32,6 +32,12 @@ class User(override var requester: Requester) : RepositoryI<UserEntity> {
.selectOne("resource" to user)
}
fun changePassword(user: UserEntity) {
requester
.getFunction("change_user_password")
.sendQuery("resource" to user)
}
class UserNotFound(override val message: String?, override val cause: Throwable?): Throwable(message, cause) {
constructor(id: UUID): this("No User with ID $id", null)
}