Class OneDriveFactoryStateManager.CredentialConfig

java.lang.Object
com.amilesend.onedrive.OneDriveFactoryStateManager.CredentialConfig
Enclosing class:
OneDriveFactoryStateManager<T extends OneDrive>

public static class OneDriveFactoryStateManager.CredentialConfig extends Object
Defines the consuming application's client credentials.

The clientId and clientSecret are obtained from the Azure application registration console. See the API documentation for more information.

Once your client identifier and secret are obtain, you may bundle your credentials as a JSON formatted text file within your JAR so that it's accessible via a resource. By default, you may save your credentials as ms-onedrive-credentials.json bundled as a JAR resource. Example format:

 {
   "clientId" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
   "clientSecret" : "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
 }
 
  • Constructor Details

    • CredentialConfig

      public CredentialConfig()
  • Method Details

    • loadDefaultCredentialConfigResource

      public static OneDriveFactoryStateManager.CredentialConfig loadDefaultCredentialConfigResource(com.google.gson.Gson gson) throws IOException
      Throws:
      IOException
    • getClientId

      public String getClientId()
      The client identifier.
    • getClientSecret

      public String getClientSecret()
      The client secret.
    • setClientId

      public void setClientId(String clientId)
      The client identifier.
    • setClientSecret

      public void setClientSecret(String clientSecret)
      The client secret.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object