Class OAuthTokenExtractors
- java.lang.Object
-
- org.syncany.plugins.transfer.oauth.OAuthTokenExtractors
-
public abstract class OAuthTokenExtractors extends java.lang.Object
Factory class to generate some commonOAuthTokenExtractors.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOAuthTokenExtractors.NamedQueryTokenExtractorAOAuthTokenExtractors.NamedQueryTokenExtractoris a simpleOAuthTokenExtractorwhich looks for a token and a CSRF secret in the redirect URL.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringRFC_ACCESS_TOKEN_FIELDstatic java.lang.StringRFC_CODE_FIELDstatic java.lang.StringRFC_STATE_FIELD
-
Constructor Summary
Constructors Constructor Description OAuthTokenExtractors()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OAuthTokenExtractornewTokenExtractorForMode(OAuthMode mode)Get a commonOAuthTokenExtractordepending 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 commonOAuthTokenExtractordepending on the chosenOAuthMode. More precisely, this creates aOAuthTokenExtractors.NamedQueryTokenExtractorwith token field id set to "state" inOAuthMode.SERVERand "access_token" inOAuthMode.BROWSER. However, "state" is used in both cases to identify a potential CSRF value.- Parameters:
mode-OAuthModesupported by theTransferPlugin.- Returns:
- A corresponding
OAuthTokenExtractors.NamedQueryTokenExtractor.
-
-