org.apache.shindig.gadgets.oauth
Class OAuthResponseParams

java.lang.Object
  extended by org.apache.shindig.gadgets.oauth.OAuthResponseParams

public class OAuthResponseParams
extends Object

Container for OAuth specific data to include in the response to the client.


Field Summary
static String APPROVAL_URL
           
static String CLIENT_STATE
           
static String ERROR_CODE
           
static String ERROR_TEXT
           
 
Constructor Summary
OAuthResponseParams(SecurityToken securityToken, HttpRequest originalRequest, BlobCrypter stateCrypter)
          Create response parameters.
 
Method Summary
 void addRequestTrace(HttpRequest request, HttpResponse response)
          Add a request/response pair to our trace of actions associated with this request.
 void addToResponse(HttpResponseBuilder response, OAuthRequestException e)
          Update a response with additional data to be returned to the application.
 String getAznUrl()
           
 OAuthClientState getNewClientState()
          Get the state we will return to the client.
 void logDetailedInfo(String note, Throwable e)
           
 void logDetailedWarning(String note)
          Log a warning message that includes the details of the request.
 void logDetailedWarning(String note, Throwable e)
          Log a warning message that includes the details of the request and the thrown exception.
 boolean sawErrorResponse()
           
 boolean sendTraceToClient()
           
 void setAznUrl(String aznUrl)
          Set the authorization URL we will return to the client.
 void setSendTraceToClient(boolean sendTraceToClient)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLIENT_STATE

public static final String CLIENT_STATE
See Also:
Constant Field Values

APPROVAL_URL

public static final String APPROVAL_URL
See Also:
Constant Field Values

ERROR_CODE

public static final String ERROR_CODE
See Also:
Constant Field Values

ERROR_TEXT

public static final String ERROR_TEXT
See Also:
Constant Field Values
Constructor Detail

OAuthResponseParams

public OAuthResponseParams(SecurityToken securityToken,
                           HttpRequest originalRequest,
                           BlobCrypter stateCrypter)
Create response parameters.

Method Detail

logDetailedWarning

public void logDetailedWarning(String note)
Log a warning message that includes the details of the request.


logDetailedWarning

public void logDetailedWarning(String note,
                               Throwable e)
Log a warning message that includes the details of the request and the thrown exception.


logDetailedInfo

public void logDetailedInfo(String note,
                            Throwable e)

addRequestTrace

public void addRequestTrace(HttpRequest request,
                            HttpResponse response)
Add a request/response pair to our trace of actions associated with this request.


sawErrorResponse

public boolean sawErrorResponse()
Returns:
true if the target server returned an error at some point during the request

addToResponse

public void addToResponse(HttpResponseBuilder response,
                          OAuthRequestException e)
Update a response with additional data to be returned to the application.


getNewClientState

public OAuthClientState getNewClientState()
Get the state we will return to the client.


getAznUrl

public String getAznUrl()

setAznUrl

public void setAznUrl(String aznUrl)
Set the authorization URL we will return to the client.


sendTraceToClient

public boolean sendTraceToClient()

setSendTraceToClient

public void setSendTraceToClient(boolean sendTraceToClient)


Copyright © 2007-2012. All Rights Reserved.