<< Back to GForge REST API

Entity: Usersession

GET

getCaptcha

Parameters (1)

Name Type Description
request \RequestParameters

Return: mixed|null

No return type is defined

getUserFromBasicAuth

Checks to see if Basic HTTP authentication data is in the specified request. If the data is present, tries to authenticate the user with the provided user/pwd.

Parameters (1)

Name Type Description
request \RequestParameters

Return: \User|boolean

The user, if valid authentication data was provided. False if no data.

getUsersession

Get the user (if any) associated with the current session.

Parameters (1)

Name Type Description
request \RequestParameters

Return: \UserBasic

The user represented by the submitted session ID. The "Nobody" user if the session is not valid.

getValidate

This service method is meant to ping and verify if the current session is still valid

Parameters (1)

Name Type Description
request \RequestParameters

Return: null

if the session hash is verified, it will respond with a 200 status, and 401 otherwise

POST

postUsersession

Create a new or refresh an existing User Session.

Parameters (1)

Name Type Description
request \RequestParameters

Return: array

A JSON object with a property called sessionHash. The value of this property uniquely identifies the combination of user and remote address, and can be submitted as the password in subsequent API requests

PUT

DELETE

deleteUserSession

Remove an existing User Session.

Parameters (1)

Name Type Description
request \RequestParameters

Return: array

result code, the 200 OK HTTP response indicates that the session has been removed. If the user is not allowed to delete the specified session (or it does not exist), then a 404 response is sent.