contract Authorized is RocketBase {

    // The issuer's address
    // In contract's RocketStorage 
    // address public token.issuer;

    // The depository's address
    // In contract's RocketStorage 
    // address public token.depository;

    // The auditor's address
    // In contract's RocketStorage 
    // address public token.auditor;

    event IssuerTransferred(address indexed previousIssuer, address indexed newIssuer);
    event AuditorTransferred(address indexed previousAuditor, address indexed newAuditor);
    event DepositoryTransferred(address indexed previousDepository, address indexed newDepository);

    /* 
     *  Modifiers
     */

    // Ensure sender is issuer   
    modifier onlyIssuer {
        require( msg.sender == issuer() );
        _;
    }

    // Ensure sender is depository
    modifier onlyDepository {
        require( msg.sender == depository() );
        _;
    }

    // Ensure sender is auditor
    modifier onlyAuditor {
        require( msg.sender == auditor() );
        _;
    }


  /**
   * @dev Allows the current owner to explicity assign a new issuer.
   * @param newIssuer The address of the new issuer.
   */
  function setIssuer(address newIssuer) public onlyOwner {
    require(newIssuer != address(0));
    rocketStorage.setAddress(keccak256("token.issuer"), newIssuer);
    emit IssuerTransferred(issuer(), newIssuer);
  }

  /**
   * @dev Get the current issuer address from storage.
   */
  function issuer() public view returns (address) {
    return rocketStorage.getAddress(keccak256("token.issuer"));
  }

  /**
   * @dev Allows the current owner to explicity assign a new auditor.
   * @param newAuditor The address of the new auditor.
   */
  function setAuditor(address newAuditor) public onlyOwner {
    require(newAuditor != address(0));
    rocketStorage.setAddress(keccak256("token.auditor"), newAuditor);
    emit AuditorTransferred(auditor(), newAuditor);
  }

  /**
   * @dev Get the current auditor address from storage.
   */
  function auditor() public view returns (address) {
    return rocketStorage.getAddress(keccak256("token.auditor"));
  }

  /**
   * @dev Allows the current owner to explicity assign a new depository.
   * @param newDepository The address of the new depository.
   */
  function setDepository(address newDepository) public onlyOwner {
    require(newDepository != address(0));
    rocketStorage.setAddress(keccak256("token.depository"), newDepository);
    emit DepositoryTransferred(depository(), newDepository);
  }

  /**
   * @dev Get the current depository address from storage.
   */
  function depository() public view returns (address) {
    return rocketStorage.getAddress(keccak256("token.depository"));
  }

}
/**
 * @title Authorized
 * @dev The Authorized contract has an issuer, depository, and auditor address, and provides basic 
 * authorization control functions, this simplifies the implementation of "user permissions".
 */
function auditor() public view returns (address) {
  return rocketStorage.getAddress(keccak256("token.auditor"));
}

/**
 * @dev Get the current auditor address from storage.
 */