KeyCredential Class
- java.
lang. Object - com.
azure. core. credential. KeyCredential
- com.
public class KeyCredential
Represents a credential that uses a key to authenticate.
Constructor Summary
Constructor | Description |
---|---|
KeyCredential(String key) |
Creates a credential that authorizes request with the given key. |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
getKey()
Retrieves the key associated to this credential. |
Key |
update(String key)
Rotates the key associated to this credential. |
Methods inherited from java.lang.Object
Constructor Details
KeyCredential
public KeyCredential(String key)
Creates a credential that authorizes request with the given key.
Parameters:
key
- The key used to authorize requests.
Method Details
getKey
public String getKey()
Retrieves the key associated to this credential.
Returns:
The key being used to authorize requests.
update
public KeyCredential update(String key)
Rotates the key associated to this credential.
Parameters:
key
- The new key to associated with this credential.
Returns:
The updated
KeyCredential
object.Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
Azure SDK for Java