Skip to content

Commit

Permalink
feat(logging): add logger decorator to add tr composite
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-hawk committed Jul 11, 2022
1 parent 6cf18d7 commit 93c7a93
Showing 1 changed file with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { WinstonLogger } from '@sp-proxy/frameworks-drivers/main/logger/WinstonLogger'
import config from '@sp-proxy/interface-adapters/config/env'
import { LogAddTrGatewayDecorator } from '@sp-proxy/interface-adapters/data/decorators/LogAddTrGatewayDecorator'
import { GetSamlFetchExternalData } from '@sp-proxy/interface-adapters/data/GetSamlFetchExternalData'
import { JwtSigner } from '@sp-proxy/interface-adapters/data/helpers/JwtSigner'
import { TokenRequestFactory } from '@sp-proxy/interface-adapters/data/helpers/TokenRequestFactory'
Expand Down Expand Up @@ -27,14 +29,18 @@ export const makeAddTrFromMetadataComposite = (
const remoteIdpFromExtDataFactory = new RemoteIdpFromExternalDataFactory()

const trWithDefaultFactory = new TrustRelationWithDefaultFactory()
const addTrGateway = new OxTrustAddTrustRelation(
config.oxTrustApi,
new AddTrustRelationOxTrustMapper(),
new UmaAuthenticator(
new UmaHeaderParser(),
new JwtSigner(),

const addTrGateway = new LogAddTrGatewayDecorator(
WinstonLogger.getInstance(),
new OxTrustAddTrustRelation(
config.oxTrustApi,
new TokenRequestFactory()
new AddTrustRelationOxTrustMapper(),
new UmaAuthenticator(
new UmaHeaderParser(),
new JwtSigner(),
config.oxTrustApi,
new TokenRequestFactory()
)
)
)
const interactor = new AddTrFromMetadataInteractor(
Expand Down

0 comments on commit 93c7a93

Please sign in to comment.