File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
src/main/java/com/azure/core/client/traits Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 33## 1.43.0-beta.1 (Unreleased)
44
55### Features Added
6+ - Added ` KeyCredentialTrait ` interface. Client builders that implement this interface will support key-based authentication.
67
78### Breaking Changes
89
Original file line number Diff line number Diff line change 1+ // Copyright (c) Microsoft Corporation. All rights reserved.
2+ // Licensed under the MIT License.
3+
4+ package com .azure .core .client .traits ;
5+
6+ import com .azure .core .credential .KeyCredential ;
7+
8+ /**
9+ * An {@link com.azure.core.client.traits Azure SDK for Java trait} providing a consistent interface for setting
10+ * {@link KeyCredential}. Refer to the Azure SDK for Java
11+ * <a href="https://aka.ms/azsdk/java/docs/identity">identity and authentication</a>
12+ * documentation for more details on proper usage of the {@link KeyCredential} type.
13+ *
14+ * @param <T> The concrete type that implements the trait. This is required so that fluent operations can continue
15+ * to return the concrete type, rather than the trait type.
16+ * @see com.azure.core.client.traits
17+ * @see KeyCredential
18+ */
19+ public interface KeyCredentialTrait <T > {
20+ /**
21+ * Sets the {@link KeyCredential} used for authentication. Refer to the Azure SDK for Java
22+ * <a href="https://aka.ms/azsdk/java/docs/identity">identity and authentication</a>
23+ * documentation for more details on proper usage of the {@link KeyCredential} type.
24+ *
25+ * @param credential the {@link KeyCredential} to be used for authentication.
26+ * @return Returns the same concrete type with the appropriate properties updated, to allow for fluent chaining of
27+ * operations.
28+ */
29+ T credential (KeyCredential credential );
30+ }
You can’t perform that action at this time.
0 commit comments