View | Details | Raw Unified | Return to bug 29900
Collapse All | Expand All

(-)a/Koha/REST/V1/Auth.pm (+6 lines)
Lines 176-181 sub authenticate_api_request { Link Here
176
        if ($valid_token) {
176
        if ($valid_token) {
177
            my $patron_id = Koha::ApiKeys->find( $valid_token->{client_id} )->patron_id;
177
            my $patron_id = Koha::ApiKeys->find( $valid_token->{client_id} )->patron_id;
178
            $user = Koha::Patrons->find($patron_id);
178
            $user = Koha::Patrons->find($patron_id);
179
180
            #record lastseen for API user using OAuth2
181
            $user->update_lastseen('api_oauth2');
179
        } else {
182
        } else {
180
183
181
            # If we have "Authorization: Bearer" header and oauth authentication
184
            # If we have "Authorization: Bearer" header and oauth authentication
Lines 350-355 sub _basic_auth { Link Here
350
        Koha::Exceptions::Authorization::Unauthorized->throw( error => 'Password has expired' );
353
        Koha::Exceptions::Authorization::Unauthorized->throw( error => 'Password has expired' );
351
    }
354
    }
352
355
356
    #update lastseen for API user
357
    $patron->update_lastseen('api_basic_auth');
358
353
    return $patron;
359
    return $patron;
354
}
360
}
355
361
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +2 lines)
Lines 110-115 Patrons: Link Here
110
               check_in: "Checking in an item"
110
               check_in: "Checking in an item"
111
               hold: "Placing a hold on an item"
111
               hold: "Placing a hold on an item"
112
               article: "Placing an article request"
112
               article: "Placing an article request"
113
               api_basic_auth: "REST API service uses Basic Authentication"
114
               api_oauth2: "REST API service uses OAuth2 authentication"
113
     -
115
     -
114
         - pref: AutoApprovePatronProfileSettings
116
         - pref: AutoApprovePatronProfileSettings
115
           choices:
117
           choices:
116
- 

Return to bug 29900