From 9c5e6b43dee8a7b708632aac259f8e8e9be73077 Mon Sep 17 00:00:00 2001 From: Elizabeth Healy Date: Thu, 21 Nov 2024 14:17:05 -0500 Subject: [PATCH] expose oauth package --- sdk/idp_access_token_source.go | 2 +- sdk/idp_cert_exchange.go | 2 +- sdk/idp_token_exchange_token_source.go | 2 +- sdk/{internal => }/oauth/claims.json | 0 sdk/{internal => }/oauth/oauth.go | 0 sdk/{internal => }/oauth/oauth_test.go | 0 sdk/{internal => }/oauth/testdata/ca.jks | Bin sdk/{internal => }/oauth/testdata/keycloak-ca.pem | 0 sdk/{internal => }/oauth/testdata/localhost.crt | 0 sdk/{internal => }/oauth/testdata/localhost.key | 0 sdk/{internal => }/oauth/testdata/sampleuser.crt | 0 sdk/{internal => }/oauth/testdata/sampleuser.key | 0 sdk/options.go | 2 +- 13 files changed, 4 insertions(+), 4 deletions(-) rename sdk/{internal => }/oauth/claims.json (100%) rename sdk/{internal => }/oauth/oauth.go (100%) rename sdk/{internal => }/oauth/oauth_test.go (100%) rename sdk/{internal => }/oauth/testdata/ca.jks (100%) rename sdk/{internal => }/oauth/testdata/keycloak-ca.pem (100%) rename sdk/{internal => }/oauth/testdata/localhost.crt (100%) rename sdk/{internal => }/oauth/testdata/localhost.key (100%) rename sdk/{internal => }/oauth/testdata/sampleuser.crt (100%) rename sdk/{internal => }/oauth/testdata/sampleuser.key (100%) diff --git a/sdk/idp_access_token_source.go b/sdk/idp_access_token_source.go index 0951dcd9b..39d1a875c 100644 --- a/sdk/idp_access_token_source.go +++ b/sdk/idp_access_token_source.go @@ -12,7 +12,7 @@ import ( "github.com/lestrrat-go/jwx/v2/jwk" "github.com/opentdf/platform/lib/ocrypto" "github.com/opentdf/platform/sdk/auth" - "github.com/opentdf/platform/sdk/internal/oauth" + "github.com/opentdf/platform/sdk/oauth" ) const ( diff --git a/sdk/idp_cert_exchange.go b/sdk/idp_cert_exchange.go index d4dacd78d..70ef827e5 100644 --- a/sdk/idp_cert_exchange.go +++ b/sdk/idp_cert_exchange.go @@ -8,7 +8,7 @@ import ( "github.com/lestrrat-go/jwx/v2/jwk" "github.com/opentdf/platform/lib/ocrypto" "github.com/opentdf/platform/sdk/auth" - "github.com/opentdf/platform/sdk/internal/oauth" + "github.com/opentdf/platform/sdk/oauth" ) type CertExchangeTokenSource struct { diff --git a/sdk/idp_token_exchange_token_source.go b/sdk/idp_token_exchange_token_source.go index b02daf5da..ef755a3f3 100644 --- a/sdk/idp_token_exchange_token_source.go +++ b/sdk/idp_token_exchange_token_source.go @@ -7,7 +7,7 @@ import ( "github.com/lestrrat-go/jwx/v2/jwk" "github.com/opentdf/platform/lib/ocrypto" "github.com/opentdf/platform/sdk/auth" - "github.com/opentdf/platform/sdk/internal/oauth" + "github.com/opentdf/platform/sdk/oauth" ) type IDPTokenExchangeTokenSource struct { diff --git a/sdk/internal/oauth/claims.json b/sdk/oauth/claims.json similarity index 100% rename from sdk/internal/oauth/claims.json rename to sdk/oauth/claims.json diff --git a/sdk/internal/oauth/oauth.go b/sdk/oauth/oauth.go similarity index 100% rename from sdk/internal/oauth/oauth.go rename to sdk/oauth/oauth.go diff --git a/sdk/internal/oauth/oauth_test.go b/sdk/oauth/oauth_test.go similarity index 100% rename from sdk/internal/oauth/oauth_test.go rename to sdk/oauth/oauth_test.go diff --git a/sdk/internal/oauth/testdata/ca.jks b/sdk/oauth/testdata/ca.jks similarity index 100% rename from sdk/internal/oauth/testdata/ca.jks rename to sdk/oauth/testdata/ca.jks diff --git a/sdk/internal/oauth/testdata/keycloak-ca.pem b/sdk/oauth/testdata/keycloak-ca.pem similarity index 100% rename from sdk/internal/oauth/testdata/keycloak-ca.pem rename to sdk/oauth/testdata/keycloak-ca.pem diff --git a/sdk/internal/oauth/testdata/localhost.crt b/sdk/oauth/testdata/localhost.crt similarity index 100% rename from sdk/internal/oauth/testdata/localhost.crt rename to sdk/oauth/testdata/localhost.crt diff --git a/sdk/internal/oauth/testdata/localhost.key b/sdk/oauth/testdata/localhost.key similarity index 100% rename from sdk/internal/oauth/testdata/localhost.key rename to sdk/oauth/testdata/localhost.key diff --git a/sdk/internal/oauth/testdata/sampleuser.crt b/sdk/oauth/testdata/sampleuser.crt similarity index 100% rename from sdk/internal/oauth/testdata/sampleuser.crt rename to sdk/oauth/testdata/sampleuser.crt diff --git a/sdk/internal/oauth/testdata/sampleuser.key b/sdk/oauth/testdata/sampleuser.key similarity index 100% rename from sdk/internal/oauth/testdata/sampleuser.key rename to sdk/oauth/testdata/sampleuser.key diff --git a/sdk/options.go b/sdk/options.go index a59a50c56..b8fb489af 100644 --- a/sdk/options.go +++ b/sdk/options.go @@ -6,7 +6,7 @@ import ( "github.com/opentdf/platform/lib/ocrypto" "github.com/opentdf/platform/sdk/auth" - "github.com/opentdf/platform/sdk/internal/oauth" + "github.com/opentdf/platform/sdk/oauth" "golang.org/x/oauth2" "google.golang.org/grpc" "google.golang.org/grpc/credentials"