{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Claims contained within JSON Web Token",
    "patternProperties": {
        "^x-nmos-[a-z]+$": {
            "description": "An object containing the access permissions of the user for the NMOS API identified by this attribute's name",
            "minProperties": 1,
            "properties": {
                "read": {
                    "items": {
                        "minLength": 1,
                        "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                },
                "write": {
                    "items": {
                        "minLength": 1,
                        "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                }
            },
            "type": "object"
        }
    },
    "properties": {
        "aud": {
            "description": "A JSON array of case-sensitive strings, each containing a StringOrURI value that identifies the recipients that the JWT is intended for",
            "oneOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "string"
                }
            ]
        },
        "azp": {
            "description": "The client identifier of the OAuth 2.0 client that requested the token",
            "type": "string"
        },
        "client_id": {
            "description": "The client identifier of the OAuth 2.0 client that requested the token",
            "type": "string"
        },
        "exp": {
            "description": "The UTC time at which the token expires",
            "type": "number"
        },
        "iat": {
            "description": "The UTC time at which the token was issued",
            "type": "number"
        },
        "iss": {
            "description": "A case-sensitive string containing a StringOrURI value that identifies the Authorization Server that issued the JWT",
            "type": "string"
        },
        "scope": {
            "description": "A string containing a space-separated list of scopes associated with the token",
            "type": "string"
        },
        "sub": {
            "description": "The unique identifier assigned to the end-user by the user authorization system",
            "type": "string"
        }
    },
    "required": [
        "iss",
        "sub",
        "aud",
        "exp"
    ],
    "title": "JSON Web Token Contents",
    "type": "object"
}
