Class OAuth2Token


  • public class OAuth2Token
    extends CloudAccessToken
    Class to use for OAuth 2 tokens. To store output on Dropbox, Google Drive or OneDrive.
    • Constructor Summary

      Constructors 
      Constructor Description
      OAuth2Token​(java.lang.String service, java.lang.String token)
      Constructor for an OAuth2Token object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.gson.JsonObject getJSON()  
      java.lang.String getToken()  
      void setToken​(java.lang.String token)  
      • Methods inherited from class java.lang.Object

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

      • OAuth2Token

        public OAuth2Token​(java.lang.String service,
                           java.lang.String token)
        Constructor for an OAuth2Token object. Needs to be used if output wants to be stored on Dropbox, Google Drive or OneDrive.
        Parameters:
        service - Dropbox, Google Drive or OneDrive
        token - OAuth2Token
    • Method Detail

      • getToken

        public java.lang.String getToken()
        Returns:
        OAuth 2 access token.
      • setToken

        public void setToken​(java.lang.String token)
        Parameters:
        token - OAuth 2 access token.
      • getJSON

        public com.google.gson.JsonObject getJSON()
        Specified by:
        getJSON in class CloudAccessToken
        Returns:
        JSONObject with the tags for the OAuth2token for the Cloud Office Print server.