---
eip: 927
label: ERC-927
title: Generalised authorisations
status: Stagnant
type: Standards Track
category: ERC
created: 2018-03-12
requires: 926
official: https://eips.ethereum.org/EIPS/eip-927
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-927.md
canonical: https://eips.huatuo.xyz/eip-927/
lang: en
tldr: A proposed single authorization interface, canCall(owner, caller, callee, func), that any contract could use instead of reinventing ERC-20 approvals or ERC-777 operators. Stagnant.
tags: [authorization, access-control, permissions, stagnant]
---

# ERC-927: Generalised authorisations

> This EIP specifies a generic authorisation mechanism, which can be used to implement a variety of authorisation patterns, replacing approvals in ERC20, operators in ERC777, and bespoke authorisation patterns in a variety of other types of contract.

**TL;DR:** A proposed single authorization interface, canCall(owner, caller, callee, func), that any contract could use instead of reinventing ERC-20 approvals or ERC-777 operators. Stagnant.

## What problem does it solve?

Many contracts let a third party act on a user's behalf. Examples include ERC-20 `approve`/`transferFrom`, ERC-777 operators, and ENS name controllers. Each standard designed its own version of this "Alice lets Bob do X" pattern. The versions are incompatible with each other, and users have to manage permissions separately in every contract.

ERC-927, by Nick Johnson, proposes **one generic mechanism** that all such contracts could share. It is inspired by DappHub's `ds-auth` and by OAuth.

## How it works

Authorizations are stored by a per-user **provider** contract. Users register their provider in the address-metadata registry from [ERC-926](/eip-926/), which lives at a well-known address. The provider answers one question:

```solidity
function canCall(address owner, address caller, address callee, bytes4 func)
    external view returns (bool);
```

| Parameter | Meaning |
| --- | --- |
| `owner` | The user whose resource is being acted on. An approved call is treated as made by this address. |
| `caller` | Who is making the call right now (`msg.sender`). |
| `callee` | The contract being called, such as the token. |
| `func` | The 4-byte selector of the function being called. |

Flow: when Bob calls `transferFrom(alice, ...)` on a token, the token looks up Alice's provider in the ERC-926 registry. It then calls `canCall(alice, bob, address(this), msg.sig)` and reverts if the answer is `false`.

Providers **should** also offer a standard way to manage permissions:

```solidity
function authoriseCaller(address owner, address caller, address callee, bytes4 func);
function revokeCaller(address owner, address caller, address callee, bytes4 func);
```

`func == 0` means "all functions on `callee`". Only the owner, or someone the owner has authorized, may change the owner's settings.

## Sample code

How a token might check permission before acting for someone else (illustrative):

```solidity
interface IMetadataRegistry { function provider(address addr) external view returns (address); }
interface IAuthProvider {
    function canCall(address owner, address caller, address callee, bytes4 func) external view returns (bool);
}

modifier authorised(address owner) {
    if (msg.sender != owner) {
        address p = REGISTRY.provider(owner);   // ERC-926 lookup
        require(p != address(0) &&
                IAuthProvider(p).canCall(owner, msg.sender, address(this), msg.sig),
                "not authorised");
    }
    _;
}

function transferFrom(address from, address to, uint256 v) external authorised(from) { /* ... */ }
```

## Things to know

- **This proposal is Stagnant and was never adopted.** Its dependency [ERC-926](/eip-926/) is Stagnant too, and no registry or provider became standard.
- The spec has no reference implementation ("Example implementation TBD"). The `provider(address)` lookup shown above is the registry function defined in ERC-926. `REGISTRY` stands for the registry's well-known address, which the spec does not give.
- Permissions are per function selector, not per amount. On its own it cannot express "Bob may spend up to 100 tokens" the way an ERC-20 allowance does.
- In practice, the ecosystem moved toward signature-based approvals ([ERC-2612](/eip-2612/) permit) and smart-contract accounts with their own permission modules, rather than one global authorization registry.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-927
