nl.surfnet.coin.api
Class AbstractApiController
java.lang.Object
nl.surfnet.coin.api.AbstractApiController
- Direct Known Subclasses:
- ApiController
public abstract class AbstractApiController
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractApiController
public AbstractApiController()
getOnBehalfOf
protected String getOnBehalfOf()
- Get the username of the (via oauth) authenticated user that performs this
request.
- Returns:
- the username in case of an end user authorized request (3 legged
oauth1, authorization code grant oauth2) or the consumer key in
case of unauthorized requests.
getClientMetaData
protected ClientMetaData getClientMetaData()
preflightCORS
@RequestMapping(method=OPTIONS,
value="/**")
public org.springframework.http.ResponseEntity<String> preflightCORS(@RequestHeader(value="Origin")
String origin,
@RequestHeader(value="Access-Control-Request-Method",required=false)
String[] methods,
@RequestHeader(value="Access-Control-Request-Headers",required=false)
String[] headers)
- Handle CORS preflight request.
- Parameters:
origin - the Origin headermethods - the "Access-Control-Request-Method" headerheaders - the "Access-Control-Request-Headers" header
- Returns:
- a ResponseEntity with 204 (no content) and the right response
headers
Copyright © 2009-2013 SURFnet bv, The Netherlands. All Rights Reserved.