com.google.api.client.extensions.java6.auth.oauth2
Class FileCredentialStore

java.lang.Object
  extended by com.google.api.client.extensions.java6.auth.oauth2.FileCredentialStore
All Implemented Interfaces:
CredentialStore

public class FileCredentialStore
extends Object
implements CredentialStore

Thread-safe file implementation of a credential store.

Since:
1.11
Author:
Rafael Naufal

Constructor Summary
FileCredentialStore(File file, JsonFactory jsonFactory)
           
 
Method Summary
 void delete(String userId, Credential credential)
           
 boolean load(String userId, Credential credential)
           
 void store(String userId, Credential credential)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileCredentialStore

public FileCredentialStore(File file,
                           JsonFactory jsonFactory)
                    throws IOException
Parameters:
file - File to store user credentials
jsonFactory - JSON factory to serialize user credentials
Throws:
IOException
Method Detail

store

public void store(String userId,
                  Credential credential)
           throws IOException
Specified by:
store in interface CredentialStore
Throws:
IOException

delete

public void delete(String userId,
                   Credential credential)
            throws IOException
Specified by:
delete in interface CredentialStore
Throws:
IOException

load

public boolean load(String userId,
                    Credential credential)
Specified by:
load in interface CredentialStore


Copyright © 2011-2012 Google. All Rights Reserved.