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 349-354 sub _basic_auth { Link Here
349
        Koha::Exceptions::Authorization::Unauthorized->throw( error => 'Password has expired' );
352
        Koha::Exceptions::Authorization::Unauthorized->throw( error => 'Password has expired' );
350
    }
353
    }
351
354
355
    #update lastseen for API user
356
    $patron->update_lastseen('api_basic_auth');
357
352
    return $patron;
358
    return $patron;
353
}
359
}
354
360
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-1 / +2 lines)
Lines 112-117 Patrons: Link Here
112
               hold: "Placing a hold on an item"
112
               hold: "Placing a hold on an item"
113
               article: "Placing an article request"
113
               article: "Placing an article request"
114
               api_verify: "Patron authentication via API"
114
               api_verify: "Patron authentication via API"
115
               api_basic_auth: "REST API service uses Basic Authentication"
116
               api_oauth2: "REST API service uses OAuth2 authentication"
115
     -
117
     -
116
         - pref: AutoApprovePatronProfileSettings
118
         - pref: AutoApprovePatronProfileSettings
117
           choices:
119
           choices:
118
- 

Return to bug 29900