Skip to content
This repository was archived by the owner on Aug 25, 2023. It is now read-only.
This repository was archived by the owner on Aug 25, 2023. It is now read-only.

Add scope to AuthorizationCredential #49

Closed
@llorllale

Description

@llorllale

The AuthorizationCredential model does not indicate the resources their owner has authorized access to. This makes it impossible for the requesting party to determine which authz cred to use for each location when multiple remote credentials are to be retrieved.

The resources granted access in an authz credential are its scope - I propose this new attribute is called exactly that, scope. Further, since a single resource location may serve multiple scopes, scope should be an array.

Since we don't want to invent new scope language, we should reuse the presentation-exchange input descriptors. So, scope should be an array of input descriptor objects.

Example
{
    "@context": [
        "https://www.w3.org/2018/credentials/v1",
        "https://trustbloc.github.io/context/vc/authorization-credential-v1.jsonld"
    ],
    "type": [
        "VerifiableCredential",
        "AuthorizationCredential"
    ],
    "id": "urn:uuid:73f5b76a-d616-4e16-81ad-216cf9632394",
    "issuanceDate": "2020-08-14T20:00:06.033356825Z",
    "issuer": "urn:uuid:fb80ed43-18b0-47e1-8f70-7020164c3302",
    "credentialSubject": {
        "id": "urn:uuid:65576427-01e4-4304-957b-ce11a1a6f4e2",
        "scope": [
            {
                "schema": {
                    "uri": "https://trustbloc.github.io/context/vc/examples/credit-card-v1.jsonld"
                },
                "constraints": {}
            }
        ],
        "subjectDID": "did:peer:1zQmVYMa5Q46sL4MsYuAd5sLEkjHoxa3ajfjUArBoXqbiR7q",
        "issuerDIDDoc": {},
        "requestingPartyDIDDoc": {}
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions