injected API to handle the authentication related operations
an optional injected API to handle the organization related operations
injected service use to handle the user related operations
injected service use to handle the invitation related operations
injected logger used to handle the logging
request context [headers, body, params, query]. Note:
params.invitationId
is required200 Status Ok
This handler will accept invitation by applying the following steps in sequence:
Check if the invitation token is valid (authAPI.checkToken)
Check if the invitation token is expired
Check if the invitationId from token is equal invitationId
Check if the invitation exists
Create user (userService.createUser)
If organizationAPI is provided, add user to organization (organizationAPI.addOrUpdateUsers)
Update invitation status to accepted (invitationService.updateInvitation)
Return created user
403 NBError Forbidden
404 NBError Not Found
500 NBError Internal Server Error
Generated using TypeDoc
Accept invitation handler