::nsmcp::Object ::nsmcp::Object dict getdef ::nx::Object ::nx::Object ::nsmcp::Object->::nx::Object ::nsmcp::Authorizer ::nsmcp::Authorizer allowed require ::nsmcp::Authorizer->::nsmcp::Object

Class ::nsmcp::Authorizer

::nsmcp::Authorizer[i] create ...

Defined in /usr/local/ns/tcl/nsmcp/security.tcl

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::nsmcp::Object[i]

Methods (to be applied on instances)

  • allowed (scripted, public)

     <instance of nsmcp::Authorizer[i]> allowed context permission

    Check a permission against the request's grants and target servers. Require both the named permission and membership of the selected server in the credential targets.

    Parameters:
    context (required)
    Authenticated request context carrying the principal, grants and selected server.
    permission (required)
    Permission name required by the requested operation.
    Returns:
    True when both checks pass, otherwise false.

    Testcases:
    No testcase defined.
  • require (scripted, public)

     <instance of nsmcp::Authorizer[i]> require context permission

    Require a permission for the current request context. Reuse allowed and raise the standard RPC authorization error when access is denied.

    Parameters:
    context (required)
    Authenticated request context carrying the principal, grants and selected server.
    permission (required)
    Permission name required by the requested operation.
    Returns:
    An empty result on success; an RPC error on denial.

    Testcases:
    No testcase defined.