Class GoogleAuthUtils


  • public class GoogleAuthUtils
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.google.api.client.json.JsonFactory JSON_FACTORY  
    • Constructor Summary

      Constructors 
      Constructor Description
      GoogleAuthUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void configure​(GoogleWsConfig googleWsConfig)  
      static com.google.api.client.auth.oauth2.Credential getCredentials​(com.google.api.client.http.javanet.NetHttpTransport HTTP_TRANSPORT)
      Creates an authorized Credential object.
      static GoogleWsConfig getGoogleWsConfig()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • JSON_FACTORY

        public static final com.google.api.client.json.JsonFactory JSON_FACTORY
    • Constructor Detail

      • GoogleAuthUtils

        public GoogleAuthUtils()
    • Method Detail

      • configure

        public static void configure​(GoogleWsConfig googleWsConfig)
      • getGoogleWsConfig

        public static GoogleWsConfig getGoogleWsConfig()
      • getCredentials

        public static com.google.api.client.auth.oauth2.Credential getCredentials​(com.google.api.client.http.javanet.NetHttpTransport HTTP_TRANSPORT)
                                                                           throws java.io.IOException
        Creates an authorized Credential object.
        Parameters:
        HTTP_TRANSPORT - The network HTTP Transport.
        Returns:
        An authorized Credential object.
        Throws:
        java.io.IOException - If the credentials.json file cannot be found.