Skip to content

Improving the names for context in access guard #353

@nsergey82

Description

@nsergey82

I find the name of the class VaultContext as well as members currentUser and tokenPayload vague:
https://github.com/MetaState-Prototype-Project/prototype/blob/main/infrastructure/evault-core/src/protocol/vault-access-guard.ts#L7

I think they should be renamed or better documented.

  1. The context is more for the incoming request than of the vault
  2. currentUser is precisely a w3id (ename) of the user sending the request (or on behalf of which it is made)
  3. tokenPayload is a token that authenitcates a "certified" platform making the request

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions