Skip to main content

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

NameType
checkRegistrationTokenServiceCheckRegistrationTokenService
userServiceLoginUserService
backendUserSerivceBackendUserService

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(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

NameTypeDescription
inputAdminLinkUserInputThe input with the register_token and the user id of the user to link
resResponse<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(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

NameTypeDescription
inputRegistrationTokenInputThe input containing the registration token obtained from the authentication flow
resResponse<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