Session Web Service
Description |
Session services |
Namespace |
http://portwise.com/ws/v1/session |
Endpoint |
https://<hostname>/ws/v1/services/Session |
Style |
Document/Literal |
WSDL |
https://<host>/ws/v1/services/Session?wsdl |
Since |
5.2 |
See also |
|
|
The session services provides access to associated information and session management.
Endpoint Services
Name |
getInfo |
Description |
Returns a list with the requested information associated with a given session identity.
|
Input |
subject |
a Subject representing the entity issuing
the lookup, the subject must be authenticated.
|
sessionId |
a string with the session identity to lookup info on, if it
is set to null the subject's session identity will be used.
|
selector |
a bitmask selector determining what information to retrieve,
any of the following flags, or a combination thereof.
Note, the client IP will only be available if authentication
has been done either via the Access Point service or explicitly
set during authorization.
Bitmask flags
0x01 |
user name |
0x02 |
client IP in dot notation |
|
|
Output |
A List<MapItem> containing the requested information. Each key is set
to the name of the information, i.e. "username" or "clientip".
|
Since |
5.2 |
Faults |
|
Name |
terminate |
Description |
Terminates all active sessions for a given user identity.
|
Input |
subject |
a Subject representing the entity performing
the terminate request which must have user account administrator privileges.
|
username |
a string with the identity of a user account. |
|
Output |
None. |
Since |
5.2 |
Faults |
|
Java Example
The example shows how to retrieve associated information from the session. Error handling and call to Authenticate omitted.
public static final int USERNAME = 0x01;
public static final int CLIENTIP = 0x02;
...
SessionsService locator = new SessionsService();
Sessions service = locator.getSession();
List<MapItem> items = service.getInfo(subject, "", USERNAME | CLIENTIP);
for (MapItem item : items) {
String value = item.getValue() == null ? "null" : new String(item.getValue(), StandardCharsets.UTF_8);
System.out.println(" " + item.getKey() + " = " + value);
}
Copyright © 1999-2023, Technology Nexus Secured Business Solutions AB. All rights reserved.