GoogleApiClient.ServerAuthCodeCallbacks.CheckResult | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Methods | Inherited Methods | [Expand All]
public static class

# GoogleApiClient.ServerAuthCodeCallbacks.CheckResult

extends Object

java.lang.Object
↳ | com.google.android.gms.common.api.GoogleApiClient.ServerAuthCodeCallbacks.CheckResult

## Class Overview

The result holder for `onCheckServerAuthorization(String, Set)` which contains below information:

- Whether the server needs a server auth code to exchange for a refresh token.
- What scopes the server requires if it needs a new refresh token.

## Summary

Public Methods
static GoogleApiClient.ServerAuthCodeCallbacks.CheckResult | newAuthNotRequiredResult() Creates a CheckResult object indicating no further auth is needed, i.e.
static GoogleApiClient.ServerAuthCodeCallbacks.CheckResult | newAuthRequiredResult(Set<Scope> requiredScopes) Creates a CheckResult object indicating further auth is needed, i.e.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Methods

#### public static GoogleApiClient.ServerAuthCodeCallbacks.CheckResult newAuthNotRequiredResult ()

Creates a CheckResult object indicating no further auth is needed, i.e. server doesn't need a (new) auth code to exchange for a (new) refresh token.

##### Returns

- a `GoogleApiClient.ServerAuthCodeCallbacks.CheckResult` object that can be used as return value for `onCheckServerAuthorization(String, Set)` callback.

#### public static GoogleApiClient.ServerAuthCodeCallbacks.CheckResult newAuthRequiredResult (Set<Scope> requiredScopes)

Creates a CheckResult object indicating further auth is needed, i.e. server needs a (new) auth code to exchange for a (new) refresh token.

##### Parameters

requiredScopes | the scope set which server requires for offline access.

##### Returns

- a `GoogleApiClient.ServerAuthCodeCallbacks.CheckResult` object that can be used as return value for `onCheckServerAuthorization(String, Set)` callback.

##### Throws

IllegalArgumentException | if a null or empty set is passed in for the requiredScopes parameter