File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed
examples/src/main/java/io/opentdf/platform Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public static void main(String[] args) {
2424 String clientId = "opentdf" ;
2525 String clientSecret = "secret" ;
2626 String platformEndpoint = "localhost:8080" ;
27- String namespaceName = "mynamespace.com " ;
27+ String namespaceName = "opentdf.io " ;
2828
2929 SDKBuilder builder = new SDKBuilder ();
3030
@@ -50,7 +50,7 @@ public static void main(String[] args) {
5050 CreateAttributeRequest createAttributeRequest =
5151 CreateAttributeRequest .newBuilder ()
5252 .setNamespaceId (namespace .getId ())
53- .setName ("test" )
53+ .setName ("test-attribute " )
5454 .setRule (
5555 AttributeRuleTypeEnum .forNumber (
5656 AttributeRuleTypeEnum .ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF_VALUE ))
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public static void main(String[] args) {
1919 String clientId = "opentdf" ;
2020 String clientSecret = "secret" ;
2121 String platformEndpoint = "localhost:8080" ;
22- String namespaceName = "mynamespace.com " ;
22+ String namespaceName = "opentdf.io " ;
2323
2424 SDKBuilder builder = new SDKBuilder ();
2525
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public static void main(String[] args) {
3434 String clientId = "opentdf" ;
3535 String clientSecret = "secret" ;
3636 String platformEndpoint = "localhost:8080" ;
37- String namespaceName = "mynamespace.com " ;
37+ String namespaceName = "opentdf.io " ;
3838 String attributeName = "test-attribute" ;
3939
4040 SDKBuilder builder = new SDKBuilder ();
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public static void main(String[] args) {
2727 String clientId = "opentdf" ;
2828 String clientSecret = "secret" ;
2929 String platformEndpoint = "localhost:8080" ;
30+ String namespaceName = "opentdf.io" ;
3031
3132 SDKBuilder builder = new SDKBuilder ();
3233
@@ -46,14 +47,12 @@ public static void main(String[] args) {
4647 .setId ("ec1" )
4748 .addEntities (
4849 Entity .newBuilder ().setId ("entity-1" ).setClientId ("opentdf" )))
49- .addActions (
50- Action .newBuilder ()
51- .setStandard (Action .StandardAction .STANDARD_ACTION_DECRYPT ))
50+ .addActions (Action .newBuilder ().setName ("read" ))
5251 .addResourceAttributes (
5352 ResourceAttribute .newBuilder ()
5453 .setResourceAttributesId ("resource-attribute-1" )
5554 .addAttributeValueFqns (
56- "https://mynamespace.com /attr/test/value/test1" )))
55+ "https://" + namespaceName + " /attr/test/value/test1" )))
5756 .build ();
5857
5958 GetDecisionsResponse getDecisionsResponse =
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ public static void main(String[] args) {
2121 String clientId = "opentdf" ;
2222 String clientSecret = "secret" ;
2323 String platformEndpoint = "localhost:8080" ;
24+ String namespaceName = "opentdf.io" ;
2425
2526 SDKBuilder builder = new SDKBuilder ();
2627
@@ -32,7 +33,7 @@ public static void main(String[] args) {
3233 .build ()) {
3334
3435 ListAttributesRequest request =
35- ListAttributesRequest .newBuilder ().setNamespace ("mynamespace.com" ).build ();
36+ ListAttributesRequest .newBuilder ().setNamespace (namespaceName ).build ();
3637
3738 ListAttributesResponse listAttributesResponse =
3839 ResponseMessageKt .getOrThrow (
You can’t perform that action at this time.
0 commit comments