Bugzilla::User::APIKey - Model for an api key belonging to a user.
use Bugzilla::User::APIKey;
my $api_key = Bugzilla::User::APIKey->new($id);
my $api_key = Bugzilla::User::APIKey->new({ name => $api_key });
# Class Functions
$user_api_key = Bugzilla::User::APIKey->create({
description => $description,
});
This package handles Bugzilla User::APIKey.
Bugzilla::User::APIKey is an implementation of Bugzilla::Object, and thus provides all the methods of Bugzilla::Object in addition to the methods listed below.
idThe internal id of the api key.
userThe Bugzilla::User object that this api key belongs to.
user_idThe user id that this api key belongs to.
api_keyThe API key, which is a random string.
descriptionAn optional string that lets the user describe what a key is used for. For example: "Dashboard key", "Application X key".
revokedIf true, this api key cannot be used.
last_usedThe date that this key was last used. undef if never used.
update_last_usedUpdates the last used value to the current timestamp. This is updated even if the RPC call resulted in an error. It is not updated when the description or the revoked flag is changed.
set_descriptionSets the new description
set_revokedSets the revoked flag