|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.component.gae.auth.GAuthAuthorizeBinding
public class GAuthAuthorizeBinding
Binds GoogleOAuthParameters
to a Camel Exchange
. This binding
is used by gauth:authorize
endpoints by default.
Field Summary | |
---|---|
static String |
GAUTH_CALLBACK
Name of the Camel header containing a callback URL. |
static String |
GAUTH_SCOPE
Name of the Camel header defining the access scope. |
Constructor Summary | |
---|---|
GAuthAuthorizeBinding()
|
Method Summary | |
---|---|
org.apache.camel.Exchange |
readResponse(GAuthEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.gdata.client.authn.oauth.GoogleOAuthParameters response)
Creates an exchange.getOut() message that represents an HTTP
redirect to Google's OAuth confirmation page. |
com.google.gdata.client.authn.oauth.GoogleOAuthParameters |
writeRequest(GAuthEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.gdata.client.authn.oauth.GoogleOAuthParameters request)
Creates a GoogleOAuthParameters object from endpoint and
exchange.getIn() data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String GAUTH_SCOPE
gauth:authorize
endpoint URI.
public static final String GAUTH_CALLBACK
gauth:authorize
endpoint
URI.
Constructor Detail |
---|
public GAuthAuthorizeBinding()
Method Detail |
---|
public com.google.gdata.client.authn.oauth.GoogleOAuthParameters writeRequest(GAuthEndpoint endpoint, org.apache.camel.Exchange exchange, com.google.gdata.client.authn.oauth.GoogleOAuthParameters request)
GoogleOAuthParameters
object from endpoint and
exchange.getIn()
data. The created parameter object is
used to fetch an unauthorized request token from Google.
writeRequest
in interface OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters>
endpoint
- exchange
- request
- ignored.
public org.apache.camel.Exchange readResponse(GAuthEndpoint endpoint, org.apache.camel.Exchange exchange, com.google.gdata.client.authn.oauth.GoogleOAuthParameters response) throws Exception
exchange.getOut()
message that represents an HTTP
redirect to Google's OAuth confirmation page. Additionally, if the
GAuthComponent
is configured to use the HMAC_SHA1 signature
method, a cookie is created containing the request token secret. It is
needed later to upgrade an authorized request token to an access token.
readResponse
in interface OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters>
endpoint
- endpoint providing binding-relevant information.exchange
- exchange to be populated or created (if null
) from response data.response
- response to read data from.
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |