Licenses
Each node in the ContentGraph can have a license specified for access and for reference. These licenses are smart contracts that follow the IAuthorization interface:
interface IAuthorization {
function auth(bytes32 id, address user) external view returns (bool isAuthorized);
}
This interface means that authentication for a user attempting to access content can be done through a simple read from the ContentGraph.sol
.
Content can then be gated by checking the users auth state using the ContentGraph.sol
method auth(bytes32 id, address user)
. The check for a user's auth state will be delegated to the attached license.
See Gating Content for more info.
License Types
At this time there are 5 license types:
- Public: A license that allows any user to access the underlying content.
- Private: A license that allows for no user to access the underlying content.
- AllowList: A license that allows for a subset of users on the network to access the underlying content.
- TimeBased: A license that allows for the configuration of a dynamic price, based on the time of purchase of access.
- TokenBased: A license that allows for the configuration of a set token balance of a user in order to access the underlying content.
Additionally there is a 6th license, the Authorizer license, which allows for the combination of these licenses with a boolean expression.
See License Types for more info.