Brownie Session Controller

@RestController
@RequestMapping(value = "BASE_EQUINOX_ENDPOINT + SESSIONS_KEY" )
open class BrownieSessionController : DefaultBrownieController

The BrownieSessionController class is useful to manage all the BrownieSession operations

Author

N7ghtm4r3 - Tecknobit

See also

EquinoxController
DefaultEquinoxController

Constructors

Link copied to clipboard
@Autowired
constructor(sessionsService: BrownieSessionsService, hostsService: HostsService)
Constructor used to init the controller

Properties

Link copied to clipboard
open var brownieServerProtector: ServerProtector
brownieServerProtector instance of the ServerProtector used to protect the accesses to a private backend instance
Link copied to clipboard
protected val configuration: EquinoxBackendConfiguration
Link copied to clipboard
currentBrownieSession the current Brownie's session used in the request
Link copied to clipboard
protected val hostsService: HostsService
hostsService the support service used to manage the hosts data
Link copied to clipboard
protected open var jsonHelper: JsonHelper
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
sessionsService the support service used to manage the sessions data
Link copied to clipboard
val SOMETHING_WENT_WRONG_MESSAGE: String = "something_went_wrong"
SOMETHING_WENT_WRONG_MESSAGE the key of the message sent to the clients when a remote SSH connection failed
Link copied to clipboard
protected open var usersRepository: R
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
@PutMapping(path = "/connect" )
open fun <T> connectToSession(@RequestBody payload: Map<String, String>): T
Endpoint used to connect to an existing session
Link copied to clipboard
@PostMapping
open fun <T> createSession(@RequestBody payload: Map<String, String>): T
Endpoint used to create a new session
Link copied to clipboard
@DeleteMapping(path = "/{" + IDENTIFIER_KEY + "}" )
open fun deleteSession(@PathVariable(value = "id") sessionId: String, @RequestParam(value = "language", required = false, defaultValue = "en") language: String, @RequestBody payload: Map<String, String>): String
Endpoint used to delete an existing session
Link copied to clipboard
protected open fun failedResponse(errorKey: String): String
Link copied to clipboard
Link copied to clipboard
protected open fun getBrownieHostIfAllowed(sessionId: String, hostId: String): BrownieHost
Method to retrieve a BrownieHost checking the identifier of the session and its identifier
Link copied to clipboard
protected open fun getInternationalizedMessage(messageKey: String): String
Link copied to clipboard
open fun initEquinoxEnvironment(context: Class<out Any>, args: 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
Link copied to clipboard
protected open fun plainResponse(status: ResponseStatus, message: String): String
Link copied to clipboard
protected open fun sessionExists(sessionId: String): Boolean
Method to check whether a session exists by its id
Link copied to clipboard
protected open fun setSessionLocale(locale: String)
Link copied to clipboard
protected open fun successResponse(): String
protected open fun <V> successResponse(value: V): HashMap<String, V>
Link copied to clipboard
protected open fun wrongProcedureResponse(): String