Skip to main content Skip to navigation

GetUserByToken (requestType=1)

The WarwickSSO cookie has a value that corresponds to a logged in user in the SSO database. To find out which user this represents, just query the GetUserByToken interface (requestType=1):

POST Request: https://websignon.warwick.ac.uk/sentry?requestType=1

POST body (URL-encoded):

  • token=givmcfsyejwrogkjcbfdnfuuheurreroiawdlleqrhdmowpmdb

Response:

urn:websignon:usersource=WarwickNDS
urn:mace:dir:attribute-def:eduPersonScopedAffiliation=member@warwick.ac.uk
user=joebloggs
expire=20051101210858
staff=true
valid=42070
token=givmcfsyejwrogkjcbfdnfuuheurreroiawdlleqrhdmowpmdb
returnType=1
member=true
id=9900000
sign=20051101090858
lastname=Bloggs
urn:mace:dir:attribute-def:eduPersonAffiliation=member
dept=Information Technology Services
deptcode=IN
firstname=Joe
email=Joe.Bloggs@warwick.ac.uk
warwickattendancemode=1
student=false
name=Joe Bloggs
urn:mace:dir:attribute-def:eduPersonTargetedID=1onogpy7jb3wc968ehsdzsfan

If the token does not exist, you'll get the following response. Basically just an error code which will always be 51 in this case:

 

returnType=51

 

The order of the name/value pairs is not guaranteed.

This is a plain text response listing all of the attributes for the user matching that particular token. The token is very long and random and is set each time a user logs in and stays the same for the length of their login. It is invalidated in the database when a user logs out or it expires (typically 8 or 10 hours...new SSOv3 sets 12 hours).

Each of these attributes is listed in detail (and others) in the attributes list page.