The owning EntityManager where this factory belongs to
The managed type of this factory
Methods that are added to object instances This property is an alias for this factory type prototype
methods
Static
Readonly
Defaultdefault properties
default oauth properties for Google
default oauth properties for Facebook
default oauth properties for GitHub
default oauth properties for Twitter
default oauth properties for LinkedIn
default oauth properties for Salesforce
Sends an email with a link to change the current username
The user is identified by their current username and password. The username must be a valid email address.
Current username (email) to identify the user
New username (email) to change the current username to
The current password of the user. Has to be passed to the function for security reason
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Loads the instance for the given id, or null if the id does not exists.
A Promise that will be fulfilled when the asynchronous operation completes.
The id to query
Optional
options: { The load options
Optional
depth?: number | booleanThe object depth which will be loaded. Depth 0 loads only this object,
true
loads the objects by reachability.
Optional
local?: booleanIndicates whether the local copy (from the entity manager) of an object should be returned if it exists. This value might be stale.
Optional
refresh?: booleanIndicates whether the object should be revalidated (cache bypass).
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Log in the user with the given username and password and starts a user session
The username of the user
The password of the user
Optional
loginOption: boolean | Function | LoginOptionThe default keeps the user logged in over multiple sessions
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Logs the user in with Facebook via OAuth
Prompts the user for the Facebook login in a new window. Before using OAuth you need to setup your application on the provider website, add the redirect uri: https://example.net/db/User/OAuth/facebook and copy the client id and the client secret to your Baqend dashboard settings. When the returned promise succeeds the user is logged in.
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Logs the user in with GitHub via OAuth
Prompts the user for the GitHub login in a new window. Before using OAuth you need to setup your application on the provider website, add the redirect uri: https://example.net/db/User/OAuth/github and copy the client id and the client secret to your Baqend dashboard settings. When the returned promise succeeds the user is logged in.
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Logs the user in with Google via OAuth
Prompts the user for the Google login in a new window. Before using OAuth you need to setup your application
on the provider website, add the redirect uri: https://example.net/db/User/OAuth/google
and copy the
client id and the client secret to your Baqend dashboard settings. When the returned promise succeeds the user is
logged in.
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Logs the user in with LinkedIn via OAuth
Prompts the user for the LinkedIn login in a new window. Before using OAuth you need to setup your application on the provider website, add the redirect uri: https://example.net/db/User/OAuth/linkedin and copy the client id and the client secret to your Baqend dashboard settings. When the returned promise succeeds the user is logged in.
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Logs the user in with Salesforce via OAuth
Prompts the user for the Salesforce login in a new window. Before using OAuth you need to setup your application
on the provider website, add the redirect uri: https://example.net/db/User/OAuth/salesforce
and copy the
client id and the client secret to your Baqend dashboard settings. When the returned promise succeeds the user is
logged in.
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Log in the user assiciated with the given token and starts a user session.
The user token.
Optional
loginOption: boolean | Function | LoginOptionThe default keeps the user logged in over multiple sessions
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Logs the user in with Twitter via OAuth
Prompts the user for the Twitter login in a new window. Before using OAuth you need to setup your application on the provider website, add the redirect uri: https://example.net/db/User/OAuth/twitter and copy the client id and the client secret to your Baqend dashboard settings. When the returned promise succeeds the user is logged in.
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Creates a new instance of the factory type
A new created instance of T
Optional
args: IArguments | any[]Constructor arguments used for instantiation, the constructor will not be called when no arguments are passed
Change the password of the given user
Username to identify the user
Current password of the user
New password of the user
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Change the password of a user, which will be identified by the given token from the reset password e-mail
resetPassword
Token from the reset password e-mail
New password of the user
Optional
loginOption: boolean | LoginOptionThe default keeps the user logged in over multiple sessions
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Creates a new partial update for this class
A partial update builder for the given entity id
The id to partial update
Optional
partialUpdate: JsonAn initial partial update to execute
Register a new user with the given username and password, if the username is not used by an another user.
The created user object, for the new registered user.
The username as a string or a
The password for the given user
Optional
loginOption: boolean | Function | LoginOptionThe default logs the user in after a successful registration and keeps the user logged in over multiple sessions
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Sends an email with a link to reset the password for the given username
The username must be a valid email address.
Username (email) to identify the user
Optional
doneCallback: anyCalled when the operation succeed.
Optional
failCallback: anyCalled when the operation failed.
Static
createCreates a new ManagedFactory for the given type
The metadata of type T
The entity manager instance
Static
Protected
createCreates a new Factory for the given type
A new object factory to created instances of T
Generated using TypeDoc
Creates a new instance of the managed type of this factory