GET/POST http://yourserver.com/services/profile |
What does it do?
Retrieve details about the user authenticated in the current browser session.
Parameters
This service has no parameters.
Return value
The service returns a JSON response with the following information:
username |
Primary unique user name or principle. When authenticated against LDAP/ActiveDirectory, this may be different than the username used to log in. |
fullName | Full name of the user. This can be used as a display name. |
User's e-mail address. Only returned when the user is authenticated against an LDAP/ActiveDirectory, and an e-mail address is available there. |
|
userZone | The location in Elvis where the private files of the user are stored. Only returned for users that have access to a private zone. |
groups | The groups that the user belongs to. These are associated with a user in the LDAP/ActiveDirectory or in the internal-users config file. |
authorities | The capabilities assigned to the user. |
Examples
AJAX login with success
The following shows the response of a successful authentication attempt.
login http://demo.elvisdam.com/services/login ?username=demo &password=demo |
profile http://demo.elvisdam.com/services/profile |
{
"authorities" : [ "ROLE_USER", ... ],
"username" : "demo",
"fullName" : "Demo User",
"userZone" : "/Users/demo",
"groups" : [ "department1" ],
"email" : "demo@example.com"
}
Session not authenticated
The following shows the response when the session is not authenticated.
logout http://demo.elvisdam.com/services/logout |
profile
http://demo.elvisdam.com/services/profile |
{
"errorcode" : 401,
"message" : "Not logged in"
}
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.