Create a SshUrlHelperMixin class.
Classes
Mixins
Members
-
<static, constant> SolarSshApiPathV1
-
The SolarSsh REST API path.
-
<static, constant> SolarSshDefaultPath
-
The SolarSsh default path.
-
<static, constant> SolarSshPathKey
-
The
UrlHelper
parameters key for the SolarSsh path. -
<static, constant> SolarSshTerminalWebSocketPath
-
The SolarSsh WebSocket path for a terminal connection.
-
<static, constant> SolarSshTerminalWebSocketSubProtocol
-
The sub-protocol to use for SolarSSH WebSocket connections.
-
<static, constant> SshSessionKey
-
An
UrlHelper
parameter key for aSshSession
instance. -
<static, constant> StartRemoteSshInstructionName
-
The node instruction for initiating a SolarSSH connection.
-
<static, constant> StopRemoteSshInstructionName
-
The node instruction for closing a SolarSSH connection.
-
undefinednodeId
-
Set the node ID.
-
undefinednodeId
-
Get the node ID.
-
undefinednodeInstructionAuthBuilder :AuthorizationV2Builder
-
Get the auth builder used for instruction URL pre-authorization values.
Type:
- AuthorizationV2Builder
-
undefinednodeUrlHelperEnvironment :Environment
-
Get the environment used for instruction URL pre-authorization values.
Type:
- Environment
-
undefinedsshSession :SshSession
-
A SSH session object.
Type:
Methods
-
undefinedbaseUrl()
-
Get the base URL to the SolarSSH v1 REST API.
The returned URL uses the configured environment to resolve the
hostUrl
, thesolarSshPath
context path.Returns:
the base URL to SolarSSH
- Type
- string
-
undefinedconnectTerminalWebSocketAuthBuilder( [nodeId])
-
Configure the instruction auth builder for pre-signing the create session request.
The returned builder will be configured for a
GET
request using theviewPendingInstructionsUrl()
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 usedReturns:
the builder
- Type
- AuthorizationV2Builder
-
undefinedcreateSshSessionAuthBuilder( [nodeId])
-
Configure the instruction auth builder for pre-signing the create session request.
The returned builder will be configured for a
GET
request using theviewPendingInstructionsUrl()
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 usedReturns:
the builder
- Type
- AuthorizationV2Builder
-
undefinedcreateSshSessionUrl( [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 usedReturns:
the URL
- Type
- string
-
undefinedhttpProxyUrl( [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 themodule:net~SshUrlHelperMixin#sshSessionId
value will be usedReturns:
the HTTP proxy URL
- Type
- string
-
undefinedstartSshSessionAuthBuilder( [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 thequeueInstructionUrl()
URL with theStartRemoteSsh
instruction.Parameters:
Name Type Argument Description sshSession
SshSession <optional>
the session to use; if not provided the
sshSession
property of this object will be usednodeId
number <optional>
the node ID to instruct; if not provided the
nodeId
property of this object will be usedReturns:
the builder
- Type
- AuthorizationV2Builder
-
undefinedstartSshSessionUrl( [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 themodule:net~SshUrlHelperMixin#sshSessionId
value will be usedReturns:
the URL
- Type
- string
-
undefinedstopSshSessionAuthBuilder( [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 thequeueInstructionUrl()
URL with theStopRemoteSsh
instruction.Parameters:
Name Type Argument Description sshSession
SshSession <optional>
the session to use; if not provided the
sshSession
property of this object will be usednodeId
number <optional>
the node ID to instruct; if not provided the
nodeId
property of this object will be usedReturns:
the builder
- Type
- AuthorizationV2Builder
-
undefinedstopSshSessionUrl( [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 themodule:net~SshUrlHelperMixin#sshSessionId
value will be usedReturns:
the URL
- Type
- string
-
undefinedterminalWebSocketUrl( [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 themodule:net~SshUrlHelperMixin#sshSessionId
value will be usedReturns:
the WebSocket terminal URL
- Type
- string
-
undefinedviewStartRemoteSshInstructionAuthBuilder( [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 usedReturns:
the builder
- Type
- AuthorizationV2Builder
-
undefinedviewStartRemoteSshInstructionUrl( [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 usedReturns:
the URL
- Type
- string
-
undefinedviewStopRemoteSshInstructionAuthBuilder( [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 usedReturns:
the builder
- Type
- AuthorizationV2Builder
-
undefinedviewStopRemoteSshInstructionUrl( [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 usedReturns:
the URL
- Type
- string