Skip to main content

is_valid_access_key

Function is_valid_access_key 

Source
pub fn is_valid_access_key(id: Principal, access_keys: &AccessKeys) -> bool
Expand description

Checks if an id is a non-expired access key regardless of scope (admin, write, or submit).

§Arguments

  • id: Principal e.g. of the caller.
  • access_keys: Reference to the current set of access keys.

§Returns

true if the id is an access key (not anonymous, calling itself or one of the known controllers), otherwise false.