Skip to content
Merged
2 changes: 1 addition & 1 deletion docs/sdks/authorization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const authProvider = await AuthProviders.clientSecretAuthProvider({
oidcOrigin: 'http://localhost:8080/auth/realms/opentdf',
});
const client = new OpenTDF({ authProvider, platformUrl: 'http://localhost:8080' });
await authProvider.updateClientPublicKey(await client.dpopKeys);
await client.ready;

const platformClient = new PlatformClient({
authProvider,
Expand Down
7 changes: 6 additions & 1 deletion docs/sdks/platform-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ SDK sdk = SDKBuilder.newBuilder()
<TabItem value="js" label="JavaScript">

```typescript
import { AuthProviders } from '@opentdf/sdk';
import { AuthProviders, OpenTDF } from '@opentdf/sdk';
import { PlatformClient } from '@opentdf/sdk/platform';

const authProvider = await AuthProviders.clientSecretAuthProvider({
Expand All @@ -71,6 +71,11 @@ const authProvider = await AuthProviders.clientSecretAuthProvider({
oidcOrigin: 'http://localhost:8080/auth/realms/opentdf',
});

// OpenTDF eagerly binds DPoP keys to the auth provider.
// Await ready before creating PlatformClient.
const client = new OpenTDF({ authProvider, platformUrl: 'http://localhost:8080' });
await client.ready;

const platform = new PlatformClient({
authProvider,
platformUrl: 'http://localhost:8080',
Expand Down
42 changes: 21 additions & 21 deletions docs/sdks/policy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public class GetNamespaceExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -234,7 +234,7 @@ public class UpdateNamespaceExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -322,7 +322,7 @@ public class DeactivateNamespaceExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -435,7 +435,7 @@ public class GetAttributeExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -536,7 +536,7 @@ public class UpdateAttributeExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -624,7 +624,7 @@ public class DeactivateAttributeExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -716,7 +716,7 @@ public class CreateAttributeValueExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -807,7 +807,7 @@ public class ListAttributeValuesExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -898,7 +898,7 @@ public class GetAttributeValueExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -1002,7 +1002,7 @@ public class GetAttributeValuesByFqnsExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -1104,7 +1104,7 @@ public class UpdateAttributeValueExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -1192,7 +1192,7 @@ public class DeactivateAttributeValueExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -1289,7 +1289,7 @@ public class ListSubjectConditionSetsExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -1380,7 +1380,7 @@ public class GetSubjectConditionSetExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -1504,7 +1504,7 @@ public class UpdateSubjectConditionSetExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -1606,7 +1606,7 @@ public class DeleteSubjectConditionSetExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -1689,7 +1689,7 @@ public class DeleteAllUnmappedSubjectConditionSetsExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -1786,7 +1786,7 @@ public class GetSubjectMappingExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -1891,7 +1891,7 @@ public class UpdateSubjectMappingExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -1978,7 +1978,7 @@ public class DeleteSubjectMappingExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down Expand Up @@ -2082,7 +2082,7 @@ public class MatchSubjectMappingsExample {

```typescript
import { PlatformClient } from '@opentdf/sdk/platform';
// See the Auth Providers guide for authProvider setup.
// See /sdks/platform-client for full setup including DPoP key binding.

const platform = new PlatformClient({ authProvider, platformUrl: 'http://localhost:8080' });

Expand Down
2 changes: 1 addition & 1 deletion docs/sdks/quickstart/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ OpenTDF provides native SDKs in three languages. Choose your language to get sta
</div>
<div className="card__footer">
<a className="button button--primary button--block" href="/sdks/quickstart/javascript">
Under development - coming soon
Get Started with JavaScript
</a>
</div>
</div>
Expand Down
Loading
Loading