Class OAuthTokenExtractors
- java.lang.Object
-
- org.syncany.plugins.transfer.oauth.OAuthTokenExtractors
-
public abstract class OAuthTokenExtractors extends java.lang.Object
Factory class to generate some commonOAuthTokenExtractor
s.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OAuthTokenExtractors.NamedQueryTokenExtractor
AOAuthTokenExtractors.NamedQueryTokenExtractor
is a simpleOAuthTokenExtractor
which looks for a token and a CSRF secret in the redirect URL.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
RFC_ACCESS_TOKEN_FIELD
static java.lang.String
RFC_CODE_FIELD
static java.lang.String
RFC_STATE_FIELD
-
Constructor Summary
Constructors Constructor Description OAuthTokenExtractors()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OAuthTokenExtractor
newTokenExtractorForMode(OAuthMode mode)
Get a commonOAuthTokenExtractor
depending on the chosenOAuthMode
.
-
-
-
Field Detail
-
RFC_CODE_FIELD
public static final java.lang.String RFC_CODE_FIELD
- See Also:
- Constant Field Values
-
RFC_ACCESS_TOKEN_FIELD
public static final java.lang.String RFC_ACCESS_TOKEN_FIELD
- See Also:
- Constant Field Values
-
RFC_STATE_FIELD
public static final java.lang.String RFC_STATE_FIELD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OAuthTokenExtractors
public OAuthTokenExtractors()
-
-
Method Detail
-
newTokenExtractorForMode
public static OAuthTokenExtractor newTokenExtractorForMode(OAuthMode mode)
Get a commonOAuthTokenExtractor
depending on the chosenOAuthMode
. More precisely, this creates aOAuthTokenExtractors.NamedQueryTokenExtractor
with token field id set to "state" inOAuthMode.SERVER
and "access_token" inOAuthMode.BROWSER
. However, "state" is used in both cases to identify a potential CSRF value.- Parameters:
mode
-OAuthMode
supported by theTransferPlugin
.- Returns:
- A corresponding
OAuthTokenExtractors.NamedQueryTokenExtractor
.
-
-