Skip to content

Commit 8c1b00e

Browse files
rsdmikeMikemadhavilosetty-intel
authored
feat: re-enable auth for ws when in console mode (#2298)
Co-authored-by: Mike <[email protected]> Co-authored-by: madhavilosetty-intel <[email protected]>
1 parent 2ba3ad2 commit 8c1b00e

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/app/devices/kvm/kvm.component.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class KvmComponent implements OnInit, OnDestroy {
6767
powerState: any = 0
6868
mpsServer = `${environment.mpsServer.replace('http', 'ws')}/relay`
6969
readyToLoadKvm = false
70-
authToken: string = environment.cloud ? '' : 'direct'
70+
authToken = ''
7171
timeInterval!: any
7272
selected = 1
7373
isDisconnecting = false
@@ -110,16 +110,12 @@ export class KvmComponent implements OnInit, OnDestroy {
110110
.pipe(
111111
switchMap((params) => {
112112
this.deviceId = params.id
113-
if (environment.cloud) {
114-
// request token from MPS
115-
return this.devicesService.getRedirectionExpirationToken(this.deviceId).pipe(
116-
tap((result) => {
117-
this.authToken = result.token
118-
})
119-
)
120-
} else {
121-
return of()
122-
}
113+
// request token from MPS
114+
return this.devicesService.getRedirectionExpirationToken(this.deviceId).pipe(
115+
tap((result) => {
116+
this.authToken = result.token
117+
})
118+
)
123119
})
124120
)
125121
.subscribe()

0 commit comments

Comments
 (0)