Skip to content

Commit

Permalink
refactor(core): Removes some copied fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dmihalcik-virtru committed Jun 20, 2024
1 parent e92fc16 commit 0ad12a5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sdk/platformconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package sdk
import "log/slog"

func (s SDK) PlatformIssuer() string {
value, ok := s.platformConfiguration["platform_issuer"].(string)
value, ok := s.config.platformConfiguration["platform_issuer"].(string)
if !ok {
slog.Warn("platform_issuer not found in platform configuration")
}
Expand Down
4 changes: 0 additions & 4 deletions sdk/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ type SDK struct {
config
conn *grpc.ClientConn
dialOptions []grpc.DialOption
kasSessionKey ocrypto.RsaKeyPair
tokenSource auth.AccessTokenSource
Namespaces namespaces.NamespaceServiceClient
Attributes attributes.AttributesServiceClient
Expand All @@ -54,7 +53,6 @@ type SDK struct {
KeyAccessServerRegistry kasregistry.KeyAccessServerRegistryServiceClient
Authorization authorization.AuthorizationServiceClient
EntityResoution entityresolution.EntityResolutionServiceClient
platformConfiguration PlatformConfiguration
wellknownConfiguration wellknownconfiguration.WellKnownServiceClient
}

Expand Down Expand Up @@ -151,8 +149,6 @@ func New(platformEndpoint string, opts ...Option) (*SDK, error) {
conn: defaultConn,
dialOptions: dialOptions,
tokenSource: accessTokenSource,
kasSessionKey: *cfg.kasSessionKey,
platformConfiguration: cfg.platformConfiguration,
Attributes: attributes.NewAttributesServiceClient(selectConn(cfg.policyConn, defaultConn)),
Namespaces: namespaces.NewNamespaceServiceClient(selectConn(cfg.policyConn, defaultConn)),
ResourceMapping: resourcemapping.NewResourceMappingServiceClient(selectConn(cfg.policyConn, defaultConn)),
Expand Down
2 changes: 1 addition & 1 deletion sdk/tdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ func (s SDK) LoadTDF(reader io.ReadSeeker) (*Reader, error) {
dialOptions: s.dialOptions,
tdfReader: tdfReader,
manifest: *manifestObj,
kasSessionKey: s.kasSessionKey,
kasSessionKey: *s.config.kasSessionKey,
}, nil
}

Expand Down

0 comments on commit 0ad12a5

Please sign in to comment.