Glider Users Controller

@RestController
open class GliderUsersController : EquinoxUsersController<T, R, H>

The GliderUsersController class is useful to manage all the user operations

Author

N7ghtm4r3 - Tecknobit

See also

EquinoxController
EquinoxUsersController

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
protected val configuration: EquinoxBackendConfiguration
Link copied to clipboard
protected open var jsonHelper: JsonHelper
Link copied to clipboard
protected val mantis: Mantis
Link copied to clipboard
protected open var me: T
Link copied to clipboard
protected open var messageSource: MessageSource
Link copied to clipboard
open var resourcesProvider: ResourcesProvider
Link copied to clipboard
val RESPONSE_SUCCESSFUL_MESSAGE: String = "operation_executed_successfully"
Link copied to clipboard
protected open var serverProtector: ServerProtector
Link copied to clipboard
protected open var usersRepository: R
Link copied to clipboard
protected open var usersService: H
Link copied to clipboard
val WRONG_DEVICE_DATA_MESSAGE: String = "wrong_device_data"
WRONG_DEVICE_DATA_MESSAGE message to use when the device data are wrong
Link copied to clipboard
val WRONG_EMAIL_MESSAGE: String = "wrong_email"
Link copied to clipboard
val WRONG_LANGUAGE_MESSAGE: String = "wrong_language"
Link copied to clipboard
val WRONG_NAME_MESSAGE: String = "wrong_name"
Link copied to clipboard
val WRONG_PASSWORD_MESSAGE: String = "wrong_password"
Link copied to clipboard
val WRONG_PROCEDURE_MESSAGE: String = "wrong_procedure"
Link copied to clipboard
val WRONG_SURNAME_MESSAGE: String = "wrong_surname"

Functions

Link copied to clipboard
protected open fun assembleSignInSuccessResponse(user: T): JSONObject
Link copied to clipboard
open fun changeEmail(id: String, token: String, payload: Map<String, String>): String
Link copied to clipboard
open fun changeLanguage(id: String, token: String, payload: Map<String, String>): String
Link copied to clipboard
open fun changePassword(id: String, token: String, payload: Map<String, String>): String
Link copied to clipboard
open fun changeProfilePic(id: String, token: String, profilePic: MultipartFile): String
Link copied to clipboard
open fun deleteAccount(id: String, token: String): String
Link copied to clipboard
@DeleteMapping(path = "USERS_KEY + "/{" + IDENTIFIER_KEY + "}" + "/" + DEVICES_KEY + "/{" + DEVICE_IDENTIFIER_KEY + "}"", headers = [] )
open fun disconnectDevice(    @PathVariable(value = "id") userId: String,     @PathVariable(value = "device_id") disconnectingDeviceId: String,     @RequestHeader(value = "token") token: String,     @RequestHeader(value = "device_id") deviceId: String): String
Endpoint used to disconnect a device from the current session
Link copied to clipboard
protected open fun failedResponse(errorKey: String): String
Link copied to clipboard
Link copied to clipboard
@GetMapping(path = "USERS_KEY + "/{" + IDENTIFIER_KEY + "}" + "/" + DEVICES_KEY", headers = [] )
open fun <T> getDevices(    @PathVariable(value = "id") userId: String,     @RequestHeader(value = "token") token: String,     @RequestHeader(value = "device_id") deviceId: String,     @RequestParam(name = "page", defaultValue = "0", required = false) page: Int,     @RequestParam(name = "pageSize", defaultValue = "10", required = false) pageSize: Int): T
Endpoint used to get the connected device of the user
Link copied to clipboard
open fun getDynamicAccountData(id: String, token: String): String

@GetMapping(path = "USERS_KEY + "/{" + IDENTIFIER_KEY + "}" + DYNAMIC_ACCOUNT_DATA_ENDPOINT", headers = [] )
open fun getDynamicAccountData(    @PathVariable(value = "id") id: String,     @RequestHeader(value = "token") token: String,     @RequestHeader(value = "device_id") deviceId: String): String
Method used to get the dynamic data of the user to correctly update in all the devices where the user is connected
Link copied to clipboard
protected open fun getInternationalizedMessage(messageKey: String): String
Link copied to clipboard
protected open fun getSignInCustomParams(): Array<Any>
Method used to get the list of the custom parameters of a custom EquinoxUser from the payload of the signIn method
Link copied to clipboard
protected open fun getSignUpCustomParams(): Array<Any>
Method used to get the list of the custom parameters of a custom EquinoxUser from the payload of the signUp method
Link copied to clipboard
open fun initEquinoxEnvironment(    storagePath: String,     saveMessage: String,     context: Class<out Any>,     args: Array<String>,     customSubDirectories: Array<String>)
Link copied to clipboard
protected open fun isMe(id: String, token: String): Boolean
Link copied to clipboard
protected open fun loadJsonHelper(payload: JSONObject)
Link copied to clipboard
protected open fun plainResponse(status: ResponseStatus, message: String): String
Link copied to clipboard
protected open fun setSessionLocale(locale: String)
Link copied to clipboard
open fun signIn(payload: Map<String, String>): String
Link copied to clipboard
open fun signUp(payload: Map<String, String>): String
Link copied to clipboard
protected open fun successResponse(): String
protected open fun <V> successResponse(value: V): HashMap<String, V>
Link copied to clipboard
private open fun validateDeviceData(custom: Array<Any>): String
Method used to validate the data of the device where the user trying to authenticate
Link copied to clipboard
protected open fun validateSignIn(email: String, password: String, language: String, custom: Array<Any>): String
Method to validate the inputs of the signIn method to correctly execute a sign-in operation
Link copied to clipboard
protected open fun validateSignUp(name: String, surname: String, email: String, password: String, language: String, custom: Array<Any>): String
Method to validate the inputs of the signUp method to correctly execute a sign-up operation