Users
In KDone, users are a particular type of model. To create a user model, inherit from KDoneUser.
data class User(override var username: String,
override var password: String?,
val name: String,
val surname: String,
val nickname: String): KDoneUser()
Attribute
passwordis optional cause other types of authentication other than username and password are supported.
Inside startKDonefunction run
userModule<User> {
}
This opens API for authentication and CRUD on User model:
- Login API
users/auth/login - Create API
users - Get API
users - Patch API
users - Delete API
users - Logout API for a single session
auth/logout - Logout API for all sessions
auth/logout?all=true
Table of contents
- JWT Configuration
- Roles and Authorizations
- Social Login
- Hash strategy
- E-mail confirmation
- Password recovery
- One-time password
- Privacy preferences