Skip to content

Commit 4e8026d

Browse files
committed
Standardize platform endpoints across all code samples to http://localhost:8080
- Updated authorization documentation (docs/sdks/authorization.mdx) from port 9002 to 8080 - Updated all code sample files to use consistent http://localhost:8080 endpoint: - Go examples: Changed from http://localhost:9002 to http://localhost:8080 - Java examples: Changed from localhost:8080 to http://localhost:8080 (added http://) - This ensures consistency across all documentation and addresses review feedback - Affects authorization, policy, TDF encryption, and other code samples
1 parent ba39da4 commit 4e8026d

11 files changed

Lines changed: 23 additions & 23 deletions

code_samples/authorization/get_decision.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

2222
func main() {
2323

24-
platformEndpoint := "http://localhost:9002"
24+
platformEndpoint := "http://localhost:8080"
2525

2626
// Create a new client
2727
client, err := sdk.New(
@@ -85,7 +85,7 @@ public class GetDecisions {
8585

8686
String clientId = "opentdf";
8787
String clientSecret = "secret";
88-
String platformEndpoint = "localhost:8080";
88+
String platformEndpoint = "http://localhost:8080";
8989

9090
SDKBuilder builder = new SDKBuilder();
9191
SDK sdk = builder.platformEndpoint(platformEndpoint)

code_samples/authorization/get_entitlements.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
func main() {
2222

23-
platformEndpoint := "http://localhost:9002"
23+
platformEndpoint := "http://localhost:8080"
2424

2525
// Create a new client
2626
client, err := sdk.New(
@@ -75,7 +75,7 @@ public class GetEntitlements {
7575

7676
String clientId = "opentdf";
7777
String clientSecret = "secret";
78-
String platformEndpoint = "localhost:8080";
78+
String platformEndpoint = "http://localhost:8080";
7979

8080
SDKBuilder builder = new SDKBuilder();
8181
SDK sdk = builder.platformEndpoint(platformEndpoint)

code_samples/policy_code/create_attribute.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
func main() {
2424

25-
platformEndpoint := "http://localhost:9002"
25+
platformEndpoint := "http://localhost:8080"
2626

2727
// Create a new client
2828
client, err := sdk.New(
@@ -83,7 +83,7 @@ public class CreateAttribute {
8383

8484
String clientId = "opentdf";
8585
String clientSecret = "secret";
86-
String platformEndpoint = "localhost:8080";
86+
String platformEndpoint = "http://localhost:8080";
8787

8888
SDKBuilder builder = new SDKBuilder();
8989
SDK sdk = builder.platformEndpoint(platformEndpoint)

code_samples/policy_code/create_namespace.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
func main() {
2121

22-
platformEndpoint := "http://localhost:9002"
22+
platformEndpoint := "http://localhost:8080"
2323

2424
// Create a new client
2525
client, err := sdk.New(
@@ -59,7 +59,7 @@ public class CreateNamespace {
5959

6060
String clientId = "opentdf";
6161
String clientSecret = "secret";
62-
String platformEndpoint = "localhost:8080";
62+
String platformEndpoint = "http://localhost:8080";
6363

6464
SDKBuilder builder = new SDKBuilder();
6565
SDK sdk = builder.platformEndpoint(platformEndpoint)

code_samples/policy_code/create_subject_condition_set.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
func main() {
2222

23-
platformEndpoint := "http://localhost:9002"
23+
platformEndpoint := "http://localhost:8080"
2424

2525
// Create a new client
2626
client, err := sdk.New(
@@ -88,7 +88,7 @@ public class CreateSubjectConditionSet {
8888

8989
String clientId = "opentdf";
9090
String clientSecret = "secret";
91-
String platformEndpoint = "localhost:8080";
91+
String platformEndpoint = "http://localhost:8080";
9292

9393
SDKBuilder builder = new SDKBuilder();
9494
SDK sdk = builder.platformEndpoint(platformEndpoint)

code_samples/policy_code/create_subject_mapping.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
func main() {
2222

23-
platformEndpoint := "http://localhost:9002"
23+
platformEndpoint := "http://localhost:8080"
2424

2525
// Create a new client
2626
client, err := sdk.New(
@@ -70,7 +70,7 @@ public class CreateSubjectMapping {
7070

7171
String clientId = "opentdf";
7272
String clientSecret = "secret";
73-
String platformEndpoint = "localhost:8080";
73+
String platformEndpoint = "http://localhost:8080";
7474

7575
SDKBuilder builder = new SDKBuilder();
7676
SDK sdk = builder.platformEndpoint(platformEndpoint)

code_samples/policy_code/list_attributes.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
func main() {
2121

22-
platformEndpoint := "http://localhost:9002"
22+
platformEndpoint := "http://localhost:8080"
2323

2424
// Create a new client
2525
client, err := sdk.New(
@@ -68,7 +68,7 @@ public class ListAttributes {
6868

6969
String clientId = "opentdf";
7070
String clientSecret = "secret";
71-
String platformEndpoint = "localhost:8080";
71+
String platformEndpoint = "http://localhost:8080";
7272

7373
SDKBuilder builder = new SDKBuilder();
7474
SDK sdk = builder.platformEndpoint(platformEndpoint)

code_samples/policy_code/list_namespaces.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
func main() {
2121

22-
platformEndpoint := "http://localhost:9002"
22+
platformEndpoint := "http://localhost:8080"
2323

2424
// Create a new client
2525
client, err := sdk.New(
@@ -59,7 +59,7 @@ public class ListNamespaces {
5959

6060
String clientId = "opentdf";
6161
String clientSecret = "secret";
62-
String platformEndpoint = "localhost:8080";
62+
String platformEndpoint = "http://localhost:8080";
6363

6464
SDKBuilder builder = new SDKBuilder();
6565
SDK sdk = builder.platformEndpoint(platformEndpoint)

code_samples/policy_code/list_subject_mapping.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919

2020
func main() {
2121

22-
platformEndpoint := "http://localhost:9002"
22+
platformEndpoint := "http://localhost:8080"
2323

2424
// Create a new client
2525
client, err := sdk.New(
@@ -64,7 +64,7 @@ public class ListSubjectMappings {
6464

6565
String clientId = "opentdf";
6666
String clientSecret = "secret";
67-
String platformEndpoint = "localhost:8080";
67+
String platformEndpoint = "http://localhost:8080";
6868

6969
SDKBuilder builder = new SDKBuilder();
7070
SDK sdk = builder.platformEndpoint(platformEndpoint)

code_samples/tdf/encryption_ztdf.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
func main() {
2121
log.Println("🚀 Starting OpenTDF example...")
2222

23-
platformEndpoint := "http://localhost:9002"
23+
platformEndpoint := "http://localhost:8080"
2424
log.Printf("📡 Connecting to platform: %s", platformEndpoint)
2525

2626
// Create a new client
@@ -107,7 +107,7 @@ public class EncryptExample {
107107
public static void main(String[] args) throws IOException, JOSEException, AutoConfigureException, InterruptedException, ExecutionException {
108108
String clientId = "opentdf";
109109
String clientSecret = "secret";
110-
String platformEndpoint = "localhost:8080";
110+
String platformEndpoint = "http://localhost:8080";
111111

112112
SDKBuilder builder = new SDKBuilder();
113113
SDK sdk = builder.platformEndpoint(platformEndpoint)

0 commit comments

Comments
 (0)