Skip to content

Commit a0b50d4

Browse files
pranav-firakePranav Firake
andauthored
fix: updating atxCredentialProvider accessible in server (#718)
## Problem GetAtxCredentialProvider was not getting called ## Solution Added optional parameter for atxCredential provider ## License By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Pranav Firake <pranavfi@amazon.com>
1 parent c2124b0 commit a0b50d4

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

runtimes/runtimes/base-runtime.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ export const baseRuntime = (connections: { reader: MessageReader; writer: Messag
232232
getConfiguration(key: string) {
233233
return undefined
234234
},
235+
getAtxCredentialsProvider() {
236+
return auth.getAtxCredentialsProvider()
237+
},
235238
}
236239

237240
const encoding = new WebBase64Encoding(self)

runtimes/runtimes/standalone.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ export const standalone = (props: RuntimeProps) => {
352352
getConfiguration(key: string) {
353353
return process.env[key]
354354
},
355+
getAtxCredentialsProvider() {
356+
return auth.getAtxCredentialsProvider()
357+
},
355358
}
356359

357360
const encoding: Encoding = {
@@ -498,6 +501,7 @@ export const standalone = (props: RuntimeProps) => {
498501
notification: lspServer.notification,
499502
sdkInitializator: sdkInitializator,
500503
agent,
504+
atxCredentialsProvider: auth.getAtxCredentialsProvider(),
501505
})
502506
})
503507

runtimes/server-interface/runtime.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,10 @@ export interface Runtime {
2626
* @returns The configuration value or undefined if the key is not set.
2727
*/
2828
getConfiguration(key: string): string | undefined
29+
30+
/**
31+
* Get the ATX credentials provider.
32+
* @returns The ATX credentials provider.
33+
*/
34+
getAtxCredentialsProvider(): any
2935
}

runtimes/server-interface/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ export type Features = {
4141
notification: Notification
4242
sdkInitializator: SDKInitializator
4343
agent: Agent
44+
atxCredentialsProvider?: CredentialsProvider
4445
}

0 commit comments

Comments
 (0)