diff options
Diffstat (limited to 'Bugzilla/Auth')
-rw-r--r-- | Bugzilla/Auth/Login/APIKey.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Bugzilla/Auth/Login/APIKey.pm b/Bugzilla/Auth/Login/APIKey.pm index 902ce4da7..4038cc8b9 100644 --- a/Bugzilla/Auth/Login/APIKey.pm +++ b/Bugzilla/Auth/Login/APIKey.pm @@ -22,6 +22,18 @@ use constant requires_verification => 0; use constant can_login => 0; use constant can_logout => 0; +use fields qw(app_id); + +sub set_app_id { + my ($self, $app_id) = @_; + $self->{app_id} = $app_id; +} + +sub app_id { + my ($self) = @_; + return $self->{app_id}; +} + # This method is only available to web services. An API key can never # be used to authenticate a Web request. sub get_login_info { @@ -45,6 +57,7 @@ sub get_login_info { } $api_key->update_last_used(); + $self->set_app_id($api_key->app_id); return { user_id => $api_key->user_id }; } |