Java Code Examples for org.chromium.sync.signin.AccountManagerHelper#GetAuthTokenCallback

The following examples show how to use org.chromium.sync.signin.AccountManagerHelper#GetAuthTokenCallback . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AndroidProfileOAuth2TokenServiceHelper.java    From android-chromium with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/**
 * Use {@link OAuth2TokenService#getOAuth2AccessToken} instead.
 */
@Deprecated
public static void getOAuth2AccessToken(Context context, @Nullable Activity activity,
        Account account, String scope, AccountManagerHelper.GetAuthTokenCallback callback) {
    OAuth2TokenService.getOAuth2AccessToken(context, activity, account, scope, callback);
}
 
Example 2
Source File: AndroidProfileOAuth2TokenServiceHelper.java    From android-chromium with BSD 2-Clause "Simplified" License 4 votes vote down vote up
/**
 * Use {@link OAuth2TokenService#getOAuth2AccessToken} instead.
 */
@Deprecated
public static void getOAuth2AccessToken(Context context, @Nullable Activity activity,
        Account account, String scope, AccountManagerHelper.GetAuthTokenCallback callback) {
    OAuth2TokenService.getOAuth2AccessToken(context, activity, account, scope, callback);
}
 
Example 3
Source File: OAuth2TokenService.java    From android-chromium with BSD 2-Clause "Simplified" License 3 votes vote down vote up
/**
 * Call this method to retrieve an OAuth2 access token for the given account and scope.
 *
 * @param activity the current activity. May be null.
 * @param account the account to get the access token for.
 * @param scope The scope to get an auth token for (without Android-style 'oauth2:' prefix).
 * @param callback called on successful and unsuccessful fetching of auth token.
 */
public static void getOAuth2AccessToken(Context context, @Nullable Activity activity,
                                        Account account, String scope,
                                        AccountManagerHelper.GetAuthTokenCallback callback) {
    String oauth2Scope = OAUTH2_SCOPE_PREFIX + scope;
    AccountManagerHelper.get(context).getAuthTokenFromForeground(
            activity, account, oauth2Scope, callback);
}
 
Example 4
Source File: OAuth2TokenService.java    From android-chromium with BSD 2-Clause "Simplified" License 3 votes vote down vote up
/**
 * Call this method to retrieve an OAuth2 access token for the given account and scope.
 *
 * @param activity the current activity. May be null.
 * @param account the account to get the access token for.
 * @param scope The scope to get an auth token for (without Android-style 'oauth2:' prefix).
 * @param callback called on successful and unsuccessful fetching of auth token.
 */
public static void getOAuth2AccessToken(Context context, @Nullable Activity activity,
                                        Account account, String scope,
                                        AccountManagerHelper.GetAuthTokenCallback callback) {
    String oauth2Scope = OAUTH2_SCOPE_PREFIX + scope;
    AccountManagerHelper.get(context).getAuthTokenFromForeground(
            activity, account, oauth2Scope, callback);
}
 
Example 5
Source File: OAuth2TokenService.java    From delion with Apache License 2.0 2 votes vote down vote up
/**
 * Call this method to retrieve an OAuth2 access token for the given account and scope.
 *
 * @param account the account to get the access token for.
 * @param scope The scope to get an auth token for (without Android-style 'oauth2:' prefix).
 * @param callback called on successful and unsuccessful fetching of auth token.
 */
public static void getOAuth2AccessToken(Context context, Account account, String scope,
        AccountManagerHelper.GetAuthTokenCallback callback) {
    String oauth2Scope = OAUTH2_SCOPE_PREFIX + scope;
    AccountManagerHelper.get(context).getAuthToken(account, oauth2Scope, callback);
}