Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Initial Implementation of Auth Caching #113
Browse files Browse the repository at this point in the history
TODO: certify that all auths specified when generating a sync or asyc
call from code are properly cached.
  • Loading branch information
bytemaster committed Jul 31, 2017
1 parent 5ab1196 commit 603e034
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions contracts/eoslib/auth.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* @file auth.h
* @brief Defines C API for interfacing with authority caching
*/
#pragma once
#include <eoslib/types.hpp>

extern "C" {

/**
* @defgroup authcache Authority Cache
* @brief APIs for saving, using, and clearing authorization
* @ingroup contractdev
*
* There are cases where one contract needs to generate a message in the name of another
* contract. A contract can cache the authority on the current message and then use that
* authority while generating a synchronous message in the future.
*
* These methods require the specified scope. An authority cached in one scope cannot be
* loaded in another.
*
* @{
*/
void cache_auth( AccountName scope, AccountName account, PermissionName perm );
void load_auth( AccountName scope, AccountName account, PermissionName perm );
void clear_auth( AccountName scope, AccountName account, PermissionName perm );
///@}

}

0 comments on commit 603e034

Please sign in to comment.