Mixin: SshUrlHelperMixin

net~ SshUrlHelperMixin

A mixin class that adds SolarSsh specific support to UrlHelper.

Members


nodeId

Set the node ID.


nodeId

Get the node ID.


nodeInstructionAuthBuilder :AuthorizationV2Builder

Get the auth builder used for instruction URL pre-authorization values.

Type:
  • AuthorizationV2Builder

nodeUrlHelperEnvironment :Environment

Get the environment used for instruction URL pre-authorization values.

Type:
  • Environment

sshSession :SshSession

A SSH session object.

Type:

Methods


baseUrl()

Get the base URL to the SolarSSH v1 REST API.

The returned URL uses the configured environment to resolve the hostUrl, the solarSshPath context path.

Returns:

the base URL to SolarSSH

Type
string

connectTerminalWebSocketAuthBuilder( [nodeId])

Configure the instruction auth builder for pre-signing the create session request.

The returned builder will be configured for a GET request using the viewPendingInstructionsUrl() URL.

Parameters:
Name Type Argument Description
nodeId number <optional>

the node ID to instruct; if not provided the nodeId property of this object will be used

Returns:

the builder

Type
AuthorizationV2Builder

createSshSessionAuthBuilder( [nodeId])

Configure the instruction auth builder for pre-signing the create session request.

The returned builder will be configured for a GET request using the viewPendingInstructionsUrl() URL.

Parameters:
Name Type Argument Description
nodeId number <optional>

the node ID to instruct; if not provided the nodeId property of this object will be used

Returns:

the builder

Type
AuthorizationV2Builder

createSshSessionUrl( [nodeId])

Generate a URL for creating a new SolarSSH session.

Parameters:
Name Type Argument Description
nodeId number <optional>

the node ID to connect to; if not provided the nodeId property of this object will be used

Returns:

the URL

Type
string

httpProxyUrl( [sessionId])

Get the URL to the SolarSSH HTTP proxy to the configured SolarNode.

Parameters:
Name Type Argument Description
sessionId string <optional>

the SshSession ID to use; if not provided the module:net~SshUrlHelperMixin#sshSessionId value will be used

Returns:

the HTTP proxy URL

Type
string

startSshSessionAuthBuilder( [sshSession] [, nodeId])

Configure the instruction auth builder for pre-signing the start session request.

The returned builder will be configured for a POST request using the queueInstructionUrl() URL with the StartRemoteSsh instruction.

Parameters:
Name Type Argument Description
sshSession SshSession <optional>

the session to use; if not provided the sshSession property of this object will be used

nodeId number <optional>

the node ID to instruct; if not provided the nodeId property of this object will be used

Returns:

the builder

Type
AuthorizationV2Builder

startSshSessionUrl( [sessionId])

Generate a URL for starting a SolarSSH session.

Parameters:
Name Type Argument Description
sessionId string <optional>

the SshSession ID to use; if not provided the module:net~SshUrlHelperMixin#sshSessionId value will be used

Returns:

the URL

Type
string

stopSshSessionAuthBuilder( [sshSession] [, nodeId])

Configure the instruction auth builder for pre-signing the stop session request.

The returned builder will be configured for a POST request using the queueInstructionUrl() URL with the StopRemoteSsh instruction.

Parameters:
Name Type Argument Description
sshSession SshSession <optional>

the session to use; if not provided the sshSession property of this object will be used

nodeId number <optional>

the node ID to instruct; if not provided the nodeId property of this object will be used

Returns:

the builder

Type
AuthorizationV2Builder

stopSshSessionUrl( [sessionId])

Generate a URL for stopping a SolarSSH session.

Parameters:
Name Type Argument Description
sessionId string <optional>

the module:domain/sshSession~SshSession ID to use; if not provided the module:net~SshUrlHelperMixin#sshSessionId value will be used

Returns:

the URL

Type
string

terminalWebSocketUrl( [sessionId])

Get the URL to the SolarSSH WebSocket termainl connection to the configured SolarNode.

Parameters:
Name Type Argument Description
sessionId string <optional>

the SshSession ID to use; if not provided the module:net~SshUrlHelperMixin#sshSessionId value will be used

Returns:

the WebSocket terminal URL

Type
string

viewStartRemoteSshInstructionAuthBuilder( [instructionId])

Configure the instruction auth builder for signing the request to view the StartRemoteSsh instruction.

The returned builder will be configured with the same URL returned from module:net~SshUrlHelperMixin#viewStartRemoteSshInstructionUrl.

Parameters:
Name Type Argument Description
instructionId number <optional>

the instruction ID to view; if not provided the startInstructionId property of the session will be used

Returns:

the builder

Type
AuthorizationV2Builder

viewStartRemoteSshInstructionUrl( [instructionId])

Generate a URL for viewing the StartRemoteSsh instruction.

Parameters:
Name Type Argument Description
instructionId number <optional>

the instruction ID to view; if not provided the startInstructionId property of the session will be used

Returns:

the URL

Type
string

viewStopRemoteSshInstructionAuthBuilder( [instructionId])

Configure the instruction auth builder for signing the request to view the StopRemoteSsh instruction.

The returned builder will be configured with the same URL returned from module:net~SshUrlHelperMixin#viewStopRemoteSshInstructionUrl.

Parameters:
Name Type Argument Description
instructionId number <optional>

the instruction ID to view; if not provided the stopInstructionId property of the session will be used

Returns:

the builder

Type
AuthorizationV2Builder

viewStopRemoteSshInstructionUrl( [instructionId])

Generate a URL for viewing the StopRemoteSsh instruction.

Parameters:
Name Type Argument Description
instructionId number <optional>

the instruction ID to view; if not provided the startInstructionId property of the session will be used

Returns:

the URL

Type
string