twitter4j.auth

## Interface AsyncOAuthSupport

All Known Subinterfaces:
  AsyncTwitter

    public interface AsyncOAuthSupport

Since:
  Twitter4J 3.0.0
Author:
  Yusuke Yamamoto - yusuke at mac.com

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `getOAuthAccessTokenAsync()` Returns an access token associated with this instance. If no access token is associated with this instance, this will retrieve a new access token.
`void` `getOAuthAccessTokenAsync(RequestToken requestToken)` Retrieves an access token associated with the supplied request token and sets userId.
`void` `getOAuthAccessTokenAsync(RequestToken requestToken, String oauthVerifier)` Retrieves an access token associated with the supplied request token and sets userId.
`void` `getOAuthAccessTokenAsync(String oauthVerifier)` Retrieves an access token.
`void` `getOAuthAccessTokenAsync(String screenName, String password)` Retrieves an access token associated with the supplied screen name and password using xAuth. In order to get access acquire AccessToken using xAuth, you must apply by sending an email to api@twitter.com — all other applications will receive an HTTP 401 error.
`void` `getOAuthRequestTokenAsync()` Retrieves a request token
`void` `getOAuthRequestTokenAsync(String callbackURL)` Retrieves a request token
`void` `getOAuthRequestTokenAsync(String callbackURL, String xAuthAccessType)` Retrieves a request token
`void` `getOAuthRequestTokenAsync(String callbackURL, String xAuthAccessType, String xAuthMode)` Retrieves a request token

### Method Detail

#### getOAuthRequestTokenAsync

    void getOAuthRequestTokenAsync()

Retrieves a request token

Since:
  Twitter4J 3.0.0
See Also:
  OAuth FAQ | Twitter Developers, OAuth Core 1.0a - 6.1. Obtaining an Unauthorized Request Token, POST oauth/request_token | Twitter Developers

#### getOAuthRequestTokenAsync

    void getOAuthRequestTokenAsync(String callbackURL)

Retrieves a request token

Parameters:
  `callbackURL` - callback URL
Since:
  Twitter4J 3.0.0
See Also:
  OAuth FAQ | Twitter Developers, OAuth Core 1.0a - 6.1. Obtaining an Unauthorized Request Token, POST oauth/request_token | Twitter Developers

#### getOAuthRequestTokenAsync

    void getOAuthRequestTokenAsync(String callbackURL,
                                   String xAuthAccessType)

Retrieves a request token

Parameters:
  `callbackURL` - callback URL
  `xAuthAccessType` - Overrides the access level an application requests to a users account. Supported values are read or write. This parameter is intended to allow a developer to register a read/write application but also request read only access when appropriate.
Since:
  Twitter4J 3.0.0
See Also:
  OAuth FAQ | Twitter Developers, OAuth Core 1.0a - 6.1. Obtaining an Unauthorized Request Token, POST oauth/request_token | Twitter Developers

#### getOAuthRequestTokenAsync

    void getOAuthRequestTokenAsync(String callbackURL,
                                   String xAuthAccessType,
                                   String xAuthMode)

Retrieves a request token

Parameters:
  `callbackURL` - callback URL
  `xAuthAccessType` - Overrides the access level an application requests to a users account. Supported values are read or write. This parameter is intended to allow a developer to register a read/write application but also request read only access when appropriate.
  `xAuthMode` - Set to reverse_auth to obtain a special request token to be used in the reverse auth process.
Since:
  Twitter4J 3.0.0
See Also:
  OAuth FAQ | Twitter Developers, OAuth Core 1.0a - 6.1. Obtaining an Unauthorized Request Token, POST oauth/request_token | Twitter Developers

#### getOAuthAccessTokenAsync

    void getOAuthAccessTokenAsync()

Returns an access token associated with this instance.
If no access token is associated with this instance, this will retrieve a new access token.

Since:
  Twitter4J 3.0.0
See Also:
  OAuth FAQ | dev.twitter.com - How long does an access token last?, OAuth Core 1.0a - 6.2. Obtaining User Authorization, POST oauth/access_token | Twitter Developers

#### getOAuthAccessTokenAsync

    void getOAuthAccessTokenAsync(String oauthVerifier)

Retrieves an access token.

Parameters:
  `oauthVerifier` - OAuth verifier. AKA pin.
Since:
  Twitter4J 3.0.0
See Also:
  OAuth FAQ | dev.twitter.com - How long does an access token last?, OAuth Core 1.0a - 6.2. Obtaining User Authorization, POST oauth/access_token | Twitter Developers

#### getOAuthAccessTokenAsync

    void getOAuthAccessTokenAsync(RequestToken requestToken)

Retrieves an access token associated with the supplied request token and sets userId.

Parameters:
  `requestToken` - the request token
Since:
  Twitter4J 3.0.0
See Also:
  OAuth FAQ | dev.twitter.com - How long does an access token last?, OAuth Core 1.0a - 6.2. Obtaining User Authorization, POST oauth/access_token | Twitter Developers

#### getOAuthAccessTokenAsync

    void getOAuthAccessTokenAsync(RequestToken requestToken,
                                  String oauthVerifier)

Retrieves an access token associated with the supplied request token and sets userId.

Parameters:
  `requestToken` - the request token
  `oauthVerifier` - OAuth verifier. AKA pin.
Since:
  Twitter 3.0.0
See Also:
  OAuth Core 1.0a - 6.2. Obtaining User Authorization, POST oauth/access_token | Twitter Developers

#### getOAuthAccessTokenAsync

    void getOAuthAccessTokenAsync(String screenName,
                                  String password)

Retrieves an access token associated with the supplied screen name and password using xAuth.
In order to get access acquire AccessToken using xAuth, you must apply by sending an email to api@twitter.com — all other applications will receive an HTTP 401 error. Web-based applications will not be granted access, except on a temporary basis for when they are converting from basic-authentication support to full OAuth support.
Storage of Twitter usernames and passwords is forbidden. By using xAuth, you are required to store only access tokens and access token secrets. If the access token expires or is expunged by a user, you must ask for their login and password again before exchanging the credentials for an access token.

Parameters:
  `screenName` - the screen name
  `password` - the password
Since:
  Twitter 3.0.0
See Also:
  OAuth FAQ | dev.twitter.com - How long does an access token last?, xAuth | Twitter Developers, POST oauth/access_token | Twitter Developers