Key | HandcarAuthentication | |
---|---|---|
Version | 1.0 | |
Included Services | ||
Java Package | edu.mit.oeit.mc3.handcar.model |
|
GET handcar/services/authentication/agentkeys/{agentId}?duration={999}&proxyname={XXXX} |
|
No REST expression |
|
GET handcar/services/authentication/agentkeys/check/active/{agentKey}?proxyname={XXXX} |
|
GET handcar/services/authentication/authentications?proxyname={XXXX} |
|
No REST expression |
Method | constructKeyForAgent | ||
---|---|---|---|
Description | Construct a Key for the specified agent Note: To explicitly log out or to disable the authentication specify a duration of zero. |
||
REST Signature | GET handcar/services/authentication/agentkeys/{agentId}?duration={999}&proxyname={XXXX} |
||
Parameters | String | agentId | The id of the agent (user) who's agent key you are trying to get, i.e. nwright@mit.edu |
Integer | duration | optional duration in seconds that you are requesting the agent key to live, default is 600 seconds or 1 hour | |
String | proxyName | optional name of user for whom this operation is being executed, if not specified taken from security context |
|
Return | String | the agent key to be appended to operations for authentication purposes | |
Errors | HandcarOperationFailedException | HTTP 500 if something goes wrong | |
HandcarPermissionDeniedException | HTTP 403 if you don't have rights to call this method for the specified user or duration |
Method | constructKeyForAgentWithExpiration | ||
---|---|---|---|
Description | Construct a Key for the specified agent using the specified expiration date | ||
Parameters | String | agentId | The id of the agent (user) who's agent key you are trying to get, i.e. nwright@mit.edu |
Date | expirationDate | expiration date to be assigned to the authentication | |
String | proxyName | optional name of user for whom this operation is being executed, if not specified taken from security context |
|
Return | String | the agent key to be appended to operations for authentication purposes | |
Errors | HandcarOperationFailedException | HTTP 500 if something goes wrong | |
HandcarPermissionDeniedException | HTTP 403 if you don't have rights to call this method for the specified user or duration |
Method | checkActiveAgentByKey | ||
---|---|---|---|
Description | Checks if there is an authentication for the key and if it is active | ||
REST Signature | GET handcar/services/authentication/agentkeys/check/active/{agentKey}?proxyname={XXXX} |
||
Parameters | String | agentKey | key or token of the agent to check if is authenticated |
String | proxyName | optional name of user for whom this operation is being executed, if not specified taken from security context |
|
Return | String | null if no such agent or if agent key is no longer active | |
Errors | HandcarOperationFailedException | HTTP 500 if something goes wrong | |
HandcarPermissionDeniedException | HTTP 403 if you don't have rights to call this method or are not allowed to proxy user |
||
HandcarNotFoundException | HTTP 404 if |
Method | getAuthentications | ||
---|---|---|---|
Description | Get all the known authentications, active and expired | ||
REST Signature | GET handcar/services/authentication/authentications?proxyname={XXXX} |
||
Parameters | String | proxyName | optional name of user for whom this operation is being executed, if not specified taken from security context |
Return | AuthenticationBeanList | the active and expired authentications that exist in the system | |
Errors | HandcarOperationFailedException | HTTP 500 if something goes wrong | |
HandcarPermissionDeniedException | HTTP 403 if you don't have rights to call this method for the specified user or duration |
Method | getAuthenticationByKey | ||
---|---|---|---|
Description | Get an authentication for the specified key | ||
Parameters | String | agentKey | used to find the authentication |
String | proxyName | optional name of user for whom this operation is being executed, if not specified taken from security context |
|
Return | AuthenticationBean | the active or expired authentication for that key | |
Errors | HandcarOperationFailedException | HTTP 500 if something goes wrong | |
HandcarPermissionDeniedException | HTTP 403 if you don't have rights to call this method for the specified user or duration | ||
HandcarNotFoundException | HTTP 404 if the agentKey does not exist |