Start basic LDAP server groundwork

This commit is contained in:
garrettmills
2020-04-16 19:59:48 -05:00
parent dbdaf775df
commit 226b90b7bf
36 changed files with 971 additions and 11 deletions

10
app/models/LDAPBase.js Normal file
View File

@@ -0,0 +1,10 @@
const { Model } = require('flitter-orm')
const ImplementationError = require('libflitter/errors/ImplementationError')
class LDAPBase extends Model {
toLDAP() {
throw new ImplementationError()
}
}
module.exports = exports = LDAPBase

View File

@@ -0,0 +1,25 @@
const Model = require('flitter-auth/model/KeyAction')
/*
* KeyAction Model
* -------------------------------------------------------------
* Represents a single available key action. Key actions
* are one-time use links that directly call a method on
* a controller. These actions:
*
* - Can pass along context
* - Have expiration dates
* - Are single-use only
* - Can automatically log in a user during the request lifecycle
*
* You can generate these actions using the request.security.keyaction()
* method.
*
* See: module:flitter-auth/SecurityContext~SecurityContext#keyaction
* See: module:flitter-auth/model/KeyAction~KeyAction
*/
class KeyAction extends Model {
}
module.exports = exports = KeyAction

View File

@@ -0,0 +1,18 @@
const AuthUser = require('flitter-auth/model/User')
/*
* Auth user model. This inherits fields and methods from the default
* flitter-auth/model/User model, however you can override methods and
* properties here as you need.
*/
class User extends AuthUser {
static get schema() {
return {...super.schema, ...{
// other schema fields here
}}
}
// Other members and methods here
}
module.exports = exports = User