Class AzureAuthToken


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

      Constructors 
      ConstructorDescription
      AzureAuthToken​(java.lang.String subscriptionKey)
      Constructs the Azure Authorization Token requestor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringgetAccessToken()
      Gets the access token.
      • Methods inherited from class java.lang.Object

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

      • AzureAuthToken

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

      • getAccessToken

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