|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.component.gae.auth.GAuthUpgradeBinding
public class GAuthUpgradeBinding
Binds GoogleOAuthParameters to a Camel Exchange. This binding
is used by gauth:upgrade endpoints by default.
| Field Summary | |
|---|---|
static String |
GAUTH_ACCESS_TOKEN
Name of the Camel header containing an access token. |
static String |
GAUTH_ACCESS_TOKEN_SECRET
Name of the Camel header containing an access token secret. |
| Constructor Summary | |
|---|---|
GAuthUpgradeBinding()
|
|
| 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 containing the
access token and the access token secret in the message header. |
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_ACCESS_TOKEN
public static final String GAUTH_ACCESS_TOKEN_SECRET
| Constructor Detail |
|---|
public GAuthUpgradeBinding()
| 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)
throws Exception
GoogleOAuthParameters object from endpoint and
exchange.getIn() data. The created parameter object is used
to upgrade an authorized request token to an access token. If the
GAuthComponent is configured to use the HMAC_SHA1 signature
method, a request token secret is obtained from a
GAuthTokenSecret.COOKIE_NAME cookie.
writeRequest in interface OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters>endpoint - exchange - request - ignored.
GAuthException - if the GAuthComponent is configured to use the
HMAC_SHA1 signature method but there's no cookie with the
request token secret.
Exception
public org.apache.camel.Exchange readResponse(GAuthEndpoint endpoint,
org.apache.camel.Exchange exchange,
com.google.gdata.client.authn.oauth.GoogleOAuthParameters response)
throws IOException
exchange.getOut() message that containing the
access token and the access token secret in the message header.
readResponse in interface OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters>endpoint - exchange - response -
IOExceptionGAUTH_ACCESS_TOKEN,
GAUTH_ACCESS_TOKEN_SECRET
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||