Class AgentManagerClient
AgentManagerClient
Class Declared in packages/sdk/client/src/services/agent-hosting-provider.ts:61
Constructors
constructor(_clientConfig, _halo)
Returns: AgentManagerClient
Arguments:
_clientConfig
: Config
_halo
: Halo
Properties
Methods
_agentManagerAuth(authDeviceCreds, [agentAuthzCredential])
Returns: Promise<void>
Arguments:
authDeviceCreds
: Credential
agentAuthzCredential
: Credential
_checkAuthCookie(authToken)
Returns: boolean
Arguments:
authToken
: any
_checkAuthorization([authToken])
Check auth token/credential from CF worker whether identity is allowed to create agent.
Note: This will prevent the client from making unnecessary requests to the AgentHostingProvider API. The AgentHostingProvider will also validate the auth token/credential on its own.
Returns: boolean
Arguments:
authToken
: any
_decodeComposerBetaJwt()
Returns: ComposerBetaJwt
Arguments: none
_ensureAuthenticated()
Returns: Promise<void>
Arguments: none
_getAuthorizationCredential()
Returns: undefined | Credential
Arguments: none
_getComposerBetaCookie()
Returns: any
Arguments: none
_openRpc()
Returns: Promise<void>
Arguments: none
_queryCredentials([type], [predicate])
Returns: Promise<Credential[]>
Arguments:
type
: string
predicate
: function
_validAuthToken()
Returns: "null" | JwtPayload
Arguments: none
createAgent(invitationCode, identityKey)
Returns: Promise<any>
Arguments:
invitationCode
: string
identityKey
: string
destroyAgent(agentID)
Returns: Promise<boolean>
Arguments:
agentID
: string
getAgent(agentID)
Returns: Promise<any>
Arguments:
agentID
: string
init([authToken])
Initialize the client, potentially using the authToken to check authorization.
Returns: boolean
Arguments:
authToken
: any
requestInitWithAuthToken(req)
Returns: RequestInit
Arguments:
req
: RequestInit
requestInitWithCredentials(req)
Returns: RequestInit
Arguments:
req
: RequestInit