Class ::nsmcp::RequestContext

::nsmcp::RequestContext[i] create ... \
           [ -permissions:required permissions:required ] \
           [ -principal:required principal:required ] \
           [ -questionPins (default "") ] \
           [ -questionRestricted:boolean (default "false") ] \
           [ -server:required server:required ] \
           [ -targets:required targets:required ]

Defined in /usr/local/ns/tcl/nsmcp/00-lifecycle.tcl

Class Relations

  • class: ::nsmcp::RequestClass[i]
  • superclass: ::nsmcp::Object[i]
::nsmcp::RequestClass create ::nsmcp::RequestContext \
     -superclass ::nsmcp::Object

Methods (to be applied on instances)

  • permissions (scripted, public)

     <instance of nsmcp::RequestContext[i]> permissions

    Return the permissions granted to this request. The returned grants describe the authenticated credential, not the registry's complete tool inventory.

    Returns:
    The permission list.

    Testcases:
    No testcase defined.
    return ${:permissions}
  • principal (scripted, public)

     <instance of nsmcp::RequestContext[i]> principal

    Return the authenticated principal for this request. Read the identity recorded when the context was created; no credential lookup is performed.

    Returns:
    The principal identifier.

    Testcases:
    No testcase defined.
    return ${:principal}
  • server (scripted, public)

     <instance of nsmcp::RequestContext[i]> server

    Return the virtual server selected for this request. This is the server bound to the authenticated context used by tool execution.

    Returns:
    The virtual-server name.

    Testcases:
    No testcase defined.
    return ${:server}
  • targets (scripted, public)

     <instance of nsmcp::RequestContext[i]> targets

    Return the servers targeted by the authenticated credential. Authorization also requires the current server to belong to this target list.

    Returns:
    The list of permitted server names.

    Testcases:
    No testcase defined.
    return ${:targets}