Class: RegisterController
api-login/auth/register.controller.RegisterController
Controller for handling self registration of new users as well as linking of existing users to new loginData
Constructors
constructor
• new RegisterController(checkRegistrationTokenService, userService, backendUserSerivce)
Parameters
| Name | Type |
|---|---|
checkRegistrationTokenService | CheckRegistrationTokenService |
userService | LoginUserService |
backendUserSerivce | BackendUserService |
Defined in
gropius-login-service/backend/src/api-login/auth/register.controller.ts:27
Properties
backendUserSerivce
• Private Readonly backendUserSerivce: BackendUserService
Defined in
gropius-login-service/backend/src/api-login/auth/register.controller.ts:30
checkRegistrationTokenService
• Private Readonly checkRegistrationTokenService: CheckRegistrationTokenService
Defined in
gropius-login-service/backend/src/api-login/auth/register.controller.ts:28
userService
• Private Readonly userService: LoginUserService
Defined in
gropius-login-service/backend/src/api-login/auth/register.controller.ts:29
Methods
adminLink
▸ adminLink(input, res): Promise<DefaultReturn>
Links a new authentication with any user specified by id
Needs admin permissions
A (still) valid registration token is needed. After a successful linking, the expiration of the activeLogin and loginData will be updated accoringly
Parameters
| Name | Type | Description |
|---|---|---|
input | AdminLinkUserInput | The input with the register_token and the user id of the user to link |
res | Response<any, Record<string, any>> | The response object of the server containing the state with the logged in user |
Returns
Promise<DefaultReturn>
The default response with operation 'admin-link'
Defined in
gropius-login-service/backend/src/api-login/auth/register.controller.ts:103
selfLink
▸ selfLink(input, res): Promise<DefaultReturn>
Links a new authentication with a strategy instance with the currently logged in user. For future logins using that authentication the user will be directly found
A (still) valid registration token is needed. After a successful linking, the expiration of the activeLogin and loginData will be updated accoringly
Parameters
| Name | Type | Description |
|---|---|---|
input | RegistrationTokenInput | The input containing the registration token obtained from the authentication flow |
res | Response<any, Record<string, any>> | The response object of the server containing the state with the logged in user |
Returns
Promise<DefaultReturn>
The default response with operation 'self-link'
Defined in
gropius-login-service/backend/src/api-login/auth/register.controller.ts:56