HandcarAuthenticationService

Key HandcarAuthentication
Version 1.0
Included Services  
Java Package edu.mit.oeit.mc3.handcar.model

The Handcar Authentication Service is a RESTful means to request authorization keys (or tokens) for a particular user (agent).
These agent keys then can be used to access the rest of the handcar services on behalf of that agent.

Operations
Main Message Structures

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations

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

Back to Operations