Use User.remoteMethod instead of loopbacks method
This is needed for loopback-connector-remote authorization. Addresses https://github.com/strongloop/loopback/issues/622.
This commit is contained in:
parent
906aa8bc07
commit
4fc07fe125
|
@ -319,7 +319,7 @@ module.exports = function(User) {
|
||||||
options.port +
|
options.port +
|
||||||
options.restApiRoot +
|
options.restApiRoot +
|
||||||
userModel.http.path +
|
userModel.http.path +
|
||||||
userModel.confirm.http.path +
|
userModel.sharedClass.find('confirm', true).http.path +
|
||||||
'?uid=' +
|
'?uid=' +
|
||||||
options.user.id +
|
options.user.id +
|
||||||
'&redirect=' +
|
'&redirect=' +
|
||||||
|
@ -480,8 +480,8 @@ module.exports = function(User) {
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
loopback.remoteMethod(
|
UserModel.remoteMethod(
|
||||||
UserModel.login,
|
'login',
|
||||||
{
|
{
|
||||||
description: 'Login a user with username/email and password',
|
description: 'Login a user with username/email and password',
|
||||||
accepts: [
|
accepts: [
|
||||||
|
@ -502,8 +502,8 @@ module.exports = function(User) {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
loopback.remoteMethod(
|
UserModel.remoteMethod(
|
||||||
UserModel.logout,
|
'logout',
|
||||||
{
|
{
|
||||||
description: 'Logout a user with access token',
|
description: 'Logout a user with access token',
|
||||||
accepts: [
|
accepts: [
|
||||||
|
@ -521,8 +521,8 @@ module.exports = function(User) {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
loopback.remoteMethod(
|
UserModel.remoteMethod(
|
||||||
UserModel.confirm,
|
'confirm',
|
||||||
{
|
{
|
||||||
description: 'Confirm a user registration with email verification token',
|
description: 'Confirm a user registration with email verification token',
|
||||||
accepts: [
|
accepts: [
|
||||||
|
@ -534,8 +534,8 @@ module.exports = function(User) {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
loopback.remoteMethod(
|
UserModel.remoteMethod(
|
||||||
UserModel.resetPassword,
|
'resetPassword',
|
||||||
{
|
{
|
||||||
description: 'Reset password for a user with email',
|
description: 'Reset password for a user with email',
|
||||||
accepts: [
|
accepts: [
|
||||||
|
|
Loading…
Reference in New Issue