Add authenticate method to OpenILS::Utils::Cronscript.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Wishlist
|
Dan Scott |
Bug Description
In order to make Cronscript a tad bit more useful for those of us who write a lot of custom scripts, I added an authenticate method to Cronscript as well as authtoken and authtime methods.
The new authenticate method takes a hashref of almost the same arguments as open-ils.
The authenticate method then does the auth.init/
As always any suggestions ideas, etc. are welcome.
For sharing cronscript_
You need only add the remote once, regardless of how many branches you wish to look at.
To add this repo as jason:
Read-only (git protocol):
git remote add jason git://git.
Read-write (ssh protocol):
git remote add jason <email address hidden>:jason/ILS
Once you have the remote added you can check out this branch:
git checkout -b cronscript_
For sharing cronscript_
You need only add the remote once, regardless of how many branches you wish to look at.
To add this repo as working:
Read-only (git protocol):
git remote add working git://git.
Read-write (ssh protocol):
git remote add working <email address hidden>
Once you have the remote added you can check out this branch:
git checkout -b cronscript_
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
A sample script to exercise the new functionality:
#!/usr/bin/perl
use OpenILS: :Utils: :Cronscript;
my $script = OpenILS: :Utils: :Cronscript- >new();
my $login = {
username => $ARGV[0],
password => $ARGV[1],
workstati on => $ARGV[2]
};
my $authtoken = $script- >authenticate( $login) ;
print($ script- >authtoken . "\n"); script- >authtime . "\n");
print($