Package com.bandwidth

Class VoiceBasicAuthManager

    • Constructor Detail

      • VoiceBasicAuthManager

        public VoiceBasicAuthManager​(String username,
                                     String password)
        Constructor.
        Parameters:
        username - String value for username.
        password - String value for password.
    • Method Detail

      • equals

        public boolean equals​(String basicAuthUserName,
                              String basicAuthPassword)
        Checks if provided credentials matched with existing ones.
        Specified by:
        equals in interface VoiceBasicAuthCredentials
        Parameters:
        basicAuthUserName - String value for credentials.
        basicAuthPassword - String value for credentials.
        Returns:
        true if credentials matched.
      • toString

        public String toString()
        Converts this VoiceBasicAuthManager into string format.
        Overrides:
        toString in class Object
        Returns:
        String representation of this class
      • apply

        public HttpRequest apply​(HttpRequest httpRequest)
        Adds authentication to the given HttpRequest.
        Specified by:
        apply in interface AuthManager
        Parameters:
        httpRequest - HttpRequest object for authentication
        Returns:
        Returns the object of HttpRequest
      • applyAsync

        public CompletableFuture<HttpRequest> applyAsync​(HttpRequest httpRequest)
        Asynchronously adds authentication to the given HttpRequest.
        Specified by:
        applyAsync in interface AuthManager
        Parameters:
        httpRequest - HttpRequest object for authentication
        Returns:
        Returns the completable future of HttpRequest