Skip to content

Commit

Permalink
Add javadocs for ApiKeyCredentials (Azure#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
noelbundick authored Oct 25, 2019
1 parent bc05f1b commit 106e729
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,29 @@

package com.azure.search;

/**
* Credentials that authorize requests to Azure Cognitive Search. It uses content within the HTTP request to
* generate the correct "api-key" header value
*
* @see SearchIndexClientBuilder
* @see SearchServiceClientBuilder
*/
public class ApiKeyCredentials {
private final String apiKey;

/**
* Creates an instance that is able to authorize requests to Azure Cognitive Search.
*
* @param apiKey a query or admin API key
*/
public ApiKeyCredentials(String apiKey) {
this.apiKey = apiKey;
}

/**
* Gets the API key
* @return the API key
*/
public String getApiKey() {
return apiKey;
}
Expand Down

0 comments on commit 106e729

Please sign in to comment.