Add basic LDAP bind functionality
This commit is contained in:
@@ -6,13 +6,23 @@ const AuthUser = require('flitter-auth/model/User')
|
||||
* properties here as you need.
|
||||
*/
|
||||
class User extends AuthUser {
|
||||
static get services() {
|
||||
return [...super.services, 'auth']
|
||||
}
|
||||
|
||||
static get schema() {
|
||||
return {...super.schema, ...{
|
||||
// other schema fields here
|
||||
}}
|
||||
}
|
||||
|
||||
// Other members and methods here
|
||||
async check_password(password) {
|
||||
return this.get_provider().check_user_auth(this, password)
|
||||
}
|
||||
|
||||
get_provider() {
|
||||
return this.auth.get_provider(this.provider)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exports = User
|
||||
|
||||
Reference in New Issue
Block a user