Class AzureAuthToken

java.lang.Object
com.iizix.translate.microsoft.AzureAuthToken

public class AzureAuthToken extends Object
Client to call Cognitive Services Azure Authentication Token service in order to get an access token.
Author:
Christopher Mindus
  • Constructor Details

    • AzureAuthToken

      public AzureAuthToken(String subscriptionKey)
      Constructs the Azure Authorization Token requestor.
      Parameters:
      subscriptionKey - The subscription key.
      Throws:
      IllegalArgumentException - If the key is not valid.
  • Method Details

    • getAccessToken

      public String getAccessToken() throws IOException
      Gets the access token.
      Returns:
      The token.
      Throws:
      IOException - For errors.