com.google.api.client.googleapis.auth.oauth2
Class GoogleClientSecrets

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.google.api.client.util.GenericData
          extended by com.google.api.client.json.GenericJson
              extended by com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets
All Implemented Interfaces:
Cloneable, Map<String,Object>

public final class GoogleClientSecrets
extends GenericJson

OAuth 2.0 client secrets JSON model as specified in client_secrets.json file format.

Sample usage:

  static GoogleClientSecrets loadClientSecretsResource(JsonFactory jsonFactory) throws IOException {
    return GoogleClientSecrets.load(
        jsonFactory, SampleClass.class.getResourceAsStream("/client_secrets.json"));
  }
 

Since:
1.7
Author:
Yaniv Inbar

Nested Class Summary
static class GoogleClientSecrets.Details
          Client credential details.
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
GoogleClientSecrets()
           
 
Method Summary
 GoogleClientSecrets.Details getDetails()
          Returns the details for either installed or web applications.
 GoogleClientSecrets.Details getInstalled()
          Returns the details for installed applications.
 GoogleClientSecrets.Details getWeb()
          Returns the details for web applications.
static GoogleClientSecrets load(JsonFactory jsonFactory, InputStream inputStream)
          Loads the client_secrets.json file from the given input stream.
 GoogleClientSecrets setInstalled(GoogleClientSecrets.Details installed)
          Sets the details for installed applications.
 GoogleClientSecrets setWeb(GoogleClientSecrets.Details web)
          Sets the details for web applications.
 
Methods inherited from class com.google.api.client.json.GenericJson
clone, getFactory, setFactory, toPrettyString, toString
 
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, getUnknownKeys, put, putAll, remove, set, setUnknownKeys
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GoogleClientSecrets

public GoogleClientSecrets()
Method Detail

getInstalled

public GoogleClientSecrets.Details getInstalled()
Returns the details for installed applications.


setInstalled

public GoogleClientSecrets setInstalled(GoogleClientSecrets.Details installed)
Sets the details for installed applications.


getWeb

public GoogleClientSecrets.Details getWeb()
Returns the details for web applications.


setWeb

public GoogleClientSecrets setWeb(GoogleClientSecrets.Details web)
Sets the details for web applications.


getDetails

public GoogleClientSecrets.Details getDetails()
Returns the details for either installed or web applications.


load

public static GoogleClientSecrets load(JsonFactory jsonFactory,
                                       InputStream inputStream)
                                throws IOException
Loads the client_secrets.json file from the given input stream.

Throws:
IOException


Copyright © 2010-2012 Google. All Rights Reserved.