Skip to content

Commit 183c3cb

Browse files
authored
Merge pull request #80872 from julianparismorgan/user/pmorgan/auth-more-languages
Adds more languages to the auth doc
2 parents 10205c4 + 9af3bb4 commit 183c3cb

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

articles/spatial-anchors/concepts/authentication.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,46 @@ Two keys are made available, which are both simultaneously valid for access to t
4040

4141
The SDK has built-in support for authenticating with account keys; you simply need to set the AccountKey property on your cloudSession object.
4242

43+
44+
# [C#](#tab/csharp)
45+
4346
```csharp
4447
this.cloudSession.Configuration.AccountKey = @"MyAccountKey";
4548
```
4649

50+
# [ObjC](#tab/objc)
51+
52+
```objc
53+
_cloudSession.configuration.accountKey = @"MyAccountKey";
54+
```
55+
56+
# [Swift](#tab/swift)
57+
58+
```swift
59+
_cloudSession!.configuration.accountKey = "MyAccountKey"
60+
```
61+
62+
# [Java](#tab/java)
63+
64+
```java
65+
mCloudSession.getConfiguration().setAccountKey("MyAccountKey");
66+
```
67+
68+
# [C++ NDK](#tab/cpp)
69+
70+
```cpp
71+
m_cloudSession->Configuration()->AccountKey("MyAccountKey");
72+
```
73+
74+
# [C++ WinRT](#tab/cppwinrt)
75+
76+
```cpp
77+
auto configuration = m_cloudSession.Configuration();
78+
configuration.AccountKey(LR"(MyAccountKey)");
79+
```
80+
81+
***
82+
4783
Once that is done, the SDK will handle the exchange of the account key for an access token, and the necessary caching of tokens for your app.
4884

4985
> [!WARNING]

0 commit comments

Comments
 (0)