feat: bypass

parent 81930fc6
......@@ -70,10 +70,11 @@ export class HttpService {
return this.http.get<Array<HostGroup>>('/api/perms/v1/user/nodes-assets/');
}
get_guacamole_token(user_id: string) {
get_guacamole_token(user_id: string, authToken: string) {
const body = new HttpParams()
.set('username', user_id)
.set('password', 'jumpserver');
.set('password', 'jumpserver')
.set('asset_token', authToken);
// {
// "authToken": "xxxxxxx",
// "username": "xxxxxx",
......
......@@ -31,7 +31,7 @@ export class ElementGuacamoleComponent implements OnInit {
// /guacamole/api/tokens will redirect to http://guacamole/api/tokens
if (this.token) {
this.userid = this._localStorage.get('user');
this._http.get_guacamole_token(this.userid).subscribe(
this._http.get_guacamole_token(this.userid, this.token).subscribe(
data => {
DataStore.guacamole_token = data['authToken'];
this._http.guacamole_token_add_asset(this.token, data['authToken']).subscribe(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment