The user definition at the framework level is done with the class decorator @AocUserDefinition
.
This decorator provides the names of the database columns that will contain the username
and password
,
as well as the entity class to which they belong, and a custom populate
in case more fields need to be queried.
We define username
and password
as the columns for username and password.
@AocUserDefinition(new AocUserConfig(AocUser, {
fieldMap: {
username: 'username',
password: 'pass'
},
populate: {}
}))
class QuestUserDefinition {}
Complete example at quest-server/src/user/quest-user-definition.ts
Full definition in the API.
Please note, browse Issues and Discussions in Github for more information