<<

NAME

Koha::ApiKey - Koha API Key Object class

API

Class methods

store

    my $api_key = Koha::ApiKey->new({ patron_id => $patron_id })->store;

Overloaded store method.

validate_secret

    if ( $api_key->validate_secret( $secret ) ) { ... }

Returns a boolean that tells if the passed secret matches the one on the DB.

plain_text_secret

    my $generated_secret = $api_key->store->plain_text_secret;

Returns the generated secret so it can be displayed to the end user. This is only accessible when the object is new and has just been stored.

Returns undef if the object was retrieved from the database.

Internal methods

_type

_generate_unused_uuid

    my $string = $self->_generate_unused_uuid($column);

$column can be 'client_id' or 'secret'.

<<